首页 > 代码库 > 5. Longest Palindromic Substring

5. Longest Palindromic Substring

5. Longest Palindromic Substring

DescriptionHintsSubmissionsDiscussSolution
 
 
DiscussPick One

 

Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.

Example:

Input: "babad"Output: "bab"Note: "aba" is also a valid answer.

 

Example:

Input: "cbbd"Output: "bb"

 

和上次做的PAT回文串题目一样,只是返回不是

 

 

5. Longest Palindromic Substring