标签:== lower public ring private word let 回文 ati
public static boolean isPalindromes(String str)
{
return isPalindromes(str.toLowerCase().toCharArray(), 0, str.length()-1);
}
private static boolean isPalindromes(char[] charArray, int low, int high)
{
while(!Character.isLetter(charArray[low]))
low++;
while(!Character.isLetter(charArray[high]))
high--;
f(charArray[low] != charArray[high])
return false;
if(low == high || low == high - 1)
return true;
return isPalindromes(charArray, low+1, high-1);
}
标签:== lower public ring private word let 回文 ati
原文地址:http://www.cnblogs.com/liuzhaowei/p/7662835.html