题目来源:牛客网。 解题方法来自题目评论区的大佬,这里仅是在个人理解了解题方法后,作为笔记记录。 描述 对于长度为n的一个字符串A(仅包含数字,大小写英文字母),请设计一个高效算法,计算其中最长回文子串的长度。 数据范围: 1≤n≤1000 解题 # # @param A string字符串 # @return int整型 # class Solution: def getLongestPalindrome(self , A: str) -> int: # 获取字符串长度 N = len(A)</