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"
见Manacher算法
本文探讨了如何在给定字符串中找到最长的回文子串,并提供了两个示例进行说明。采用Manacher算法实现高效的查找过程。
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"
见Manacher算法

被折叠的 条评论
为什么被折叠?