A Thinking Ape interview question

Write the code for string matching algorithm.