Pregunta de entrevista de Amazon

Find substring within words, efficiently.