中心扩展即可。 public int getLongestPalindrome (String A) { // write code here int len=A.length(); int max=1; for (int i=0;i<A.length()-1;i++){ max=Math.max(max,Math.max(func(A,i,i),func(A,i,i+1))); } return max; } public int func(...