5 Longest Palindromic Substring
1. Question
Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis 1000.
Example:
Example:
2. Implementation
(1) DP
3. Time & Space Complexity
DP: 时间复杂度O(n^2), 空间复杂度O(n^2)
Last updated