5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example 1:
Input: "babad"
Output: "bab"
Note: "aba" is also a valid answer.
Example 2:
Input: "cbbd"
Output: "bb"
题意:求字符串中最长回文子串
class Solution {
public:
string longestPalindrome(string s) {
string res;
for(int i=0;i=0&&k=0&&k