Amazon interview question

Write a function to detect if a character string is palindrome or not.