Microsoft Interview Question

String matching