일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- DWG
- kaggle
- concurrency
- 컴퓨터의 구조
- Python
- 파이썬
- 운영체제
- shiba
- LeetCode
- 43. Multiply Strings
- 315. Count of Smaller Numbers After Self
- Regular Expression
- data science
- 시바견
- Class
- 30. Substring with Concatenation of All Words
- Substring with Concatenation of All Words
- Protocol
- 프로그래머스
- Generator
- Python Implementation
- 715. Range Module
- 밴픽
- Python Code
- attribute
- 109. Convert Sorted List to Binary Search Tree
- Decorator
- Convert Sorted List to Binary Search Tree
- iterator
- t1
Archives
- Today
- Total
목록Minimum Window Substring (1)
Scribbling
LeetCode: 76. Minimum Window Substring
First: O(N) solution. However, is_satisfied function is not very efficient. class Solution: def minWindow(self, s, t): ret = '' from collections import Counter c = Counter(t) chars = c.keys() j = 0 for i, char in enumerate(s): if char in chars: c[char] -= 1 if self.is_satisfied(c): if not ret or (i - j + 1)
Computer Science/Coding Test
2021. 9. 30. 00:32