Amazon interview question

Check if string is palindrome