Toast Inc interview question

Palindrome validation for a string