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