Amazon interview question

Write code to check palindrome. (15 Min)