← 返回 bytedance 的题目列表Longest Palindromic Substring
类型:online_judge
Given a string s, return the longest palindromic substring in s.
Input: one line string s.
Output: one line string, the longest palindromic substring (if multiple answers exist, output any).
Constraints:
1 <= len(s) <= 2000
Examples:
Input: babad
Output: bab
Input: cbbd
Output: bb
Example
Input
babad
Output
bab