← 返回 cisco 的题目列表Find Longest Palindromic Substring
类型:online_judge
Given a string, find the longest palindromic substring. The input is a string consisting of uppercase letters, and the output is the longest palindromic substring. If there are multiple substrings of the same length, return the lexicographically smallest one.
Input: String: A string consisting of uppercase letters
Output: The longest palindromic substring.
Sample Input: YABCBAZ
Sample Output: ABCBA
Example
Input
YABCBAZ