General Motors (GM) Interview Question

How to detect a palindrome of a given string.