Level 4 · Advanced
Free Tries lessons
4 lessons, about 36 minutes in all. Each teaches one idea with a visual, then gives you one problem built for it. Read the lessons here, then create a free account to solve the problems and keep your progress.
Stage 0Words as paths
- Does this exact word exist?Store every word as a path of letters from a shared root, one node per character.10 min
- Starts withWalk a prefix through the trie without checking any end marker: reaching the last letter is enough.8 min
- How many words start with this?Count, at every node, how many words pass through it, updated as each word is inserted.9 min
- The longest prefix that is a wordWalk target through the trie, remembering the last point where an end marker was seen.9 min
There’s more after this
These are the opening stages of Tries. The full path climbs on to harder problems and a mastery test. Create a free account and we’ll keep your place.
Start the full path free