AlgoScope

Trie Delete

AlgorithmintermediateTrie Operations

Unmark the terminal; prune nodes upward while they have no children and are not terminal.

Decision · step 2 of 5Trie: Delete a word and prune its tail
•cartt✓dog✓node

Walking "cart" reaches its last node, which is terminal. Drop that mark: the word is gone, though its letters may still be needed by other words.

Open in the player →or start at step 2

What you will see

The terminal marker goes; dangling nodes disappear from the leaf upward.

How trie works →

Cost

BestO(L)
AverageO(L)
WorstO(L)
SpaceO(L)

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next.

Screen readers: Text and pattern cells announce index and character; each step announces the aligned positions, the comparison result and the shift.

Reduced motion: The pattern row snaps to its new alignment with a crossfade instead of sliding.

Before this

Taught by the same lesson

Trie covers these too, in the same run.