Description
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example:
|
|
Note: “aba” is also a valid answer.
Example:
|
|
从给定字符串中找出最长的回文子串
Solution
从最大长度开始判断是否回文,是则返回
|
|
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example:
|
|
Note: “aba” is also a valid answer.
Example:
|
|
从给定字符串中找出最长的回文子串
从最大长度开始判断是否回文,是则返回
|
|