일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 109. Convert Sorted List to Binary Search Tree
- Python
- iterator
- LeetCode
- Substring with Concatenation of All Words
- Decorator
- Class
- 시바견
- Protocol
- DWG
- 30. Substring with Concatenation of All Words
- attribute
- 밴픽
- 컴퓨터의 구조
- Generator
- concurrency
- shiba
- kaggle
- data science
- t1
- Convert Sorted List to Binary Search Tree
- 315. Count of Smaller Numbers After Self
- Python Implementation
- 43. Multiply Strings
- 프로그래머스
- Regular Expression
- 파이썬
- 715. Range Module
- Python Code
- 운영체제
Archives
- Today
- Total
목록97. Interleaving String (1)
Scribbling
LeetCode: 97. Interleaving String
DFS version class Solution: def isInterleave(self, s1: str, s2: str, s3: str) -> bool: if len(s1) + len(s2) != len(s3): return False self.s1 = s1 self.s2 = s2 self.s3 = s3 self.dp = set() return self.dfs(0, 0, 0) def dfs(self, i, j, k): if (i, j, k) in self.dp: return False if k == len(self.s3): return True if i < len(self.s1) and self.s1[i] == self.s3[k]: if self.dfs(i+1, j, k+1): return True i..
Computer Science/Coding Test
2021. 10. 11. 16:59