IBM Interview Question

write a function to check if a string is a palindrome