动态规划 O(N^2) O(N^2) import java.util.*; public class Solution { public int getLongestPalindrome(String A, int n) { // write code here // 状态定义:P(i,j)表示从i到j的子串是回文串 // 状态转移:P(i,j)=P(i+1,j-1) and S[i] == S[j] // 边界条件:P(i,i)=true // P(i,i+1) = (S[i] =...