Implement a trie supporting insertion, exact word search, and prefix search.
Input: one operation per line —
insert w — insert word wsearch w — print true if w was insertedstartsWith p — print true if any inserted word starts with pOutput: one line per operation — insert prints null; the others print true/false.
insert apple search apple search app startsWith app insert app search app
null true false true null true
Run your code against the sample tests, or Submit to run the full suite.