Microsoft interview question

Implement find function of words