isPalindrome finished.