美文网首页
5. Longest Palindromic Substring

5. Longest Palindromic Substring

作者: 陆文斌 | 来源:发表于2017-07-31 12:41 被阅读0次

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"

相关文章

网友评论

      本文标题:5. Longest Palindromic Substring

      本文链接:https://www.haomeiwen.com/subject/xsallxtx.html