Trie stores strings character by character. Shared prefixes reuse the same path, terminal nodes mark full words, and prefixes can return autocomplete suggestions.
Step: 0/0 · Inserted: 0 · Speed: 1×
Press Play
Trie structure
Words = cat, car, dog, dot, date, goat
Search = car, can, dog, goat
Autocomplete = ca, do, g
Phase = Idle
Words and current characters
Insert
Search
Autocomplete
Current query
Completed words / search result
Autocomplete suggestions
Prefix: —
Insert words into the trie and reuse prefix paths when possible.