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