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