Amazon Interview Question

2) Given a string, write a program to check if it is a palindrome.