일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- concurrency
- 315. Count of Smaller Numbers After Self
- 시바견
- 파이썬
- 프로그래머스
- 컴퓨터의 구조
- Class
- Generator
- 43. Multiply Strings
- t1
- data science
- 밴픽
- attribute
- DWG
- 715. Range Module
- Python
- Convert Sorted List to Binary Search Tree
- Python Implementation
- shiba
- Protocol
- iterator
- Regular Expression
- Decorator
- Substring with Concatenation of All Words
- 운영체제
- kaggle
- 30. Substring with Concatenation of All Words
- Python Code
- 109. Convert Sorted List to Binary Search Tree
- LeetCode
Archives
- Today
- Total
목록131. Palindrome Partitioning (1)
Scribbling
LeetCode: 131. Palindrome Partitioning
class Solution: def partition(self, s: str) -> List[List[str]]: self.ret = [] self.dfs(s, []) return self.ret def dfs(self, s, path): if not s: self.ret.append(path) return for i in range(1, len(s)+1): first, second = s[:i], s[i:] if self.is_Palindromic(first): self.dfs(second, path+[first]) def is_Palindromic(self, s): return s == s[::-1]
Computer Science/Coding Test
2021. 11. 13. 01:09