Accenture Interview Question

Write a code to check if a string is a palindrome.