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