
오늘 리뷰할 문제는 palindrome partitioning 2이다. https://leetcode.com/problems/palindrome-partitioning-ii/ int: def is_palindrome(string: str) -> bool: return string == string[::-1] cache = {} def solve_min_cut(i: int, j: int) -> int: key = (i, j) if key in cache: return cache[key] if is_palindrome(s[i:j]): cache[key] = 0 return 0 min_cut = j - i + 1 for index in range(i + 1, j): if is_palindrome(s[i:ind..
개발/알고리즘
2023. 12. 19. 22:54
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- slay the spire에 진심인편
- leetcode
- scramble string
- otel
- 회고
- Python
- substring with concatenation of all words
- datalakehouse
- valid number
- n queens 2
- 개발자 글쓰기
- mlse
- hard mode challenge
- distinct subsequences
- maximum rectangle
- leetcode 매일 풀기
- first missing positive
- word ladder 2
- text justification
- 가상면접 사례로 배우는 대규모 시스템 설계
- 글또 10기
- best time to buy and sell stock 3
- longest valid parentheses
- binary tree maximum path sum
- sudoku solver
- permutation sequence
- 알고리즘
- leetcode 매일풀기
- palindrome partitioning 2
- wildcard matching
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함