Longest Palindromic Substring
Nov 11 '11
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.
class Solution {
public:
string longestPalindrome(string s) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
}
};
本文探讨了如何在给定字符串中找到最长的回文子串,并提供了相应的算法实现。
816

被折叠的 条评论
为什么被折叠?



