amazon palindrome question