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