일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Protocol
- 프로그래머스
- 30. Substring with Concatenation of All Words
- Python Code
- 43. Multiply Strings
- 109. Convert Sorted List to Binary Search Tree
- t1
- Convert Sorted List to Binary Search Tree
- Substring with Concatenation of All Words
- kaggle
- 운영체제
- iterator
- 파이썬
- attribute
- Generator
- 715. Range Module
- concurrency
- 밴픽
- Python
- Decorator
- 시바견
- DWG
- LeetCode
- Regular Expression
- Class
- 315. Count of Smaller Numbers After Self
- shiba
- data science
- 컴퓨터의 구조
Archives
- Today
- Total
목록5. Longest Palindromic Substring (1)
Scribbling
LeetCode: 5. Longest Palindromic Substring
Dynamic Programming을 이용한 방법: X + + X 는 Palindrome Substring이다는 특성을 이용한다. 위를 bottom-up으로 구현하려면, 문자열의 길이가 커지는 순(1, 2, 3, ....) 으로 DP를 연산하면 된다. class Solution: def longestPalindrome(self, s: str) -> str: ret = "" is_Palindrome = [[False] * len(s) for _ in range(len(s))] for i in range(len(s)): is_Palindrome[i][i] = True ret = s[i:i+1] for i in range(len(s)-1): if s[i] == s[i+1]: is_Palindrome[i][i+..
Computer Science/Coding Test
2021. 8. 12. 19:34