Epic Interview Question

Substring and palindrome related question.