Capgemini Interview Question

WAP to check if a string is a palindrome.