YUNOVA · Data Structures & Algorithms · Module 13: Advanced data structures
Trie data structure
Trie data structure
Key points
- A trie stores strings character by character along paths from the root.
- Insert and search take O(L) time for a word of length L.
- Tries answer prefix queries such as autocomplete efficiently.