Tries and prefix trees: autocomplete to compressed tries
11 steps · about 3 h 18 min · Intermediate
- Tries in 2 Minutes (video, YouTube, 3 min)
A quick picture of what a trie is and why prefix search is fast, before you read any code.
- Trie (reference, Wikipedia, 15 min)
Gives you the standard definitions, the history, and the link to radix trees.
- 8.1 Trie Data Structure (video, YouTube, 20 min)
A longer walkthrough of why tries exist, the node structure, and insert, search and delete.
- Trie Data Structure Implementation (article, AlgosWithMichael, 15 min)
Covers insert, search and startsWith with their time and space complexity.
- Trie Data Structure — Insert, Search, Starts With, Autocomplete (article, skills101, 20 min)
Adds per-node prefix counts and autocomplete, with Python and Java code.
- Module A-10: Tries: Prefix Trees and Autocomplete (tutorial, Data Structures and Algorithms In-Depth, 25 min)
Explains why hash maps can't answer prefix queries, then builds autocomplete as walk-then-collect.
- Trie Data Structure: Prefix Search and Autocomplete (article, Raghuveer, 20 min)
Ranks suggestions by frequency, as a real search box does, and previews the compact trie.
- Radix Tree [Compact version of Trie] (article, OpenGenus, 20 min)
Shows how edges hold whole strings, with search and insert examples.
- Compressed Tries - GeeksforGeeks (article, GeeksforGeeks, 10 min)
Compares standard and compressed tries on memory and speed.
- Radix tree (reference, Wikipedia, 15 min)
Formal treatment of radix trees, their operations, and variants such as HAT-tries.
- Trie in Depth: Prefix Trees From First Principles to Radix Trees, Autocomplete and Longest-Prefix Match (article, Belgavi.AI Lab, 35 min)
Final step: cached top-k autocomplete, deletion and longest-prefix match in one article.