Epic interview question

Substring and palindrome related question.