Meta Interview Question

Word pattern matching using tries