Longest Palindromic Substring
Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis 1000.
Example 1:
Input: "babad"
Output: "bab"
Note: "aba" is also a valid answer.
Example 2:
Input: "cbbd"
Output: "bb"
Solution
class Solution {
public String longestPalindrome(String s) {
}
}
Last updated
Was this helpful?