See how a Trie (Prefix Tree) enables O(m) search, insert, and startsWith — where m is the word length. Powers autocomplete in every search bar you've used.
Step through to reveal explanations.