A trie stores words as character paths. Words with the same prefix share their leading nodes.
Lookup follows one character at a time, and a terminal marker distinguishes a complete word. Autocomplete collects endings below a prefix node, but broad prefixes need result limits.
When to use
Use it for prefix search, autocomplete, and routing rules.