NumPy allowed · plain Python earns 10 bonus points
Build and query a prefix tree supporting dictionary insertion, exact lookup, and prefix matching.
Implement simulate_trie(operations): simulate a Trie tree. Support operations insert, search (returns boolean indicating exact word match), and starts_with (returns boolean indicating if any inserted word starts with the prefix). Return list of booleans resulting from search and starts_with calls.
simulate_trie(operations: list[dict]) -> list[bool]