Microsoft interview question

String matching