Amazon Interview Question

Code to check whether a string is pallindrome or not