Whatnot interview question

String Matching with tries solution