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