Yelp interview question

Palindrome related question