Intel Corporation interview question

Coding question: searching for a substring