# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param A string字符串 # @return int整型 #双指针 #for 0 <= i < len(s): # 找到以 s[i] 为中心的回文串 # 找到以 s[i] 和 s[i+1] 为中心的回文串 # 更新答案 class Solution: def ifhuiwen(self,s,l,r): while l>=0 and r<len(s) and s[l]==s[r]: l-=1 r+=1 return s[l+1:r] def getLongestPal...