Check whether a string is a palindrome | Citadel Interview Question