LESSON 3.05 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Tries
Watch words share letter paths, then find every word with a prefix.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 3.05 · TRIE BAY1 WORD · 3 LETTERS · 3 NODES
01
Stage 1 of 6 · Insert a word
A trie stores "cat" as a path of 3 letter nodes. The last node gets a word-end mark.
Explain it simply
The trie starts with an empty root on the left. The word "cat" goes in one letter at a time: c, a and t. Each letter gets a new node, linked to the one before. The last node is filled, because a word ends there.
The root links to the nodes c, a and t, in a row. The node t is filled: the word cat ends there.
letter node (filled: word end)shared prefixsearch path, resultmiss, list scan costmissing child
Toy: 4 to 8 words · larger lists add random 3- to 7-letter words
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
New nodes equal the word length minus the stored prefix length.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 2 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.