Microsoft Palindrome Interview Question