Amazon interview question

Code to check whether a string is pallindrome or not