일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 밴픽
- Protocol
- LeetCode
- 30. Substring with Concatenation of All Words
- 프로그래머스
- Convert Sorted List to Binary Search Tree
- 파이썬
- Python Code
- Python
- kaggle
- t1
- Substring with Concatenation of All Words
- iterator
- 315. Count of Smaller Numbers After Self
- DWG
- 109. Convert Sorted List to Binary Search Tree
- Generator
- Regular Expression
- attribute
- concurrency
- Python Implementation
- 컴퓨터의 구조
- 43. Multiply Strings
- 운영체제
- 시바견
- Decorator
- shiba
- data science
- Class
- 715. Range Module
Archives
- Today
- Total
목록76. 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