Citi Interview Question

Checking if a string is a valid palindrome