Pergunta de entrevista da empresa Brigham Young University (BYU)

How would you code to check if one string contained a substring of another? (In linear time)