Pick an algorithm, enter your own numbers or use a preset, then step through the run. The pseudocode and the explanation follow each step.
Trie: insert and search
Store words by their letters, so words with a shared prefix share nodes. A search follows one child per letter, then checks whether the last node ends a stored word.
Try it yourself
Insert cat, car, and ca. Which node is shared by cat and car, and why does ca need its own end marker?
Step through the run
Step 1 of 18
Words so farempty
waiting
current
finished
Insert "cat": start at the root.
Labels under values name their role, such as lo, hi, mid, i, j, min, L and R. Faded items are already ruled out or already in place.