Meta interview question

how to implement string matching algorithm