일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- LeetCode
- Class
- Generator
- 30. Substring with Concatenation of All Words
- Substring with Concatenation of All Words
- Protocol
- 315. Count of Smaller Numbers After Self
- data science
- t1
- Python Implementation
- Python Code
- 시바견
- 43. Multiply Strings
- kaggle
- 운영체제
- iterator
- shiba
- Convert Sorted List to Binary Search Tree
- concurrency
- 프로그래머스
- 컴퓨터의 구조
- 파이썬
- 715. Range Module
- Regular Expression
- DWG
- Decorator
- Python
- attribute
- 109. Convert Sorted List to Binary Search Tree
- 밴픽
Archives
- Today
- Total
목록44. Wildcard Matching (1)
Scribbling
44. Wildcard Matching
생각보다는 쉽게 풀린다. class Solution: def isMatch(self, s: str, p: str) -> bool: n = len(p) m = len(s) # matched[i][j]: (i-1)th pattern matches (j-1)th string matched = [[False] * (m+1) for _ in range(n+1)] matched[0][0] = True for j in range(1, m+1): matched[0][j] = False for i in range(1, n+1): if p[i-1] == '*': matched[i][0] = matched[i-1][0] for i in range(1, n+1): for j in range(1, m+1): if p[i-1] ..
Computer Science/Coding Test
2021. 9. 6. 15:41