41

每日一算--最长回文子串

 5 years ago
source link: https://juejin.im/post/5caffd235188251b006f76a0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
题目 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。 示例1 输入: "babad" 输出: "bab" 注意: "aba" 也是一个有效答案。 复制代码 示例2 输入: "cbbd" 输出: "bb" 复制代码

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK