AlgoScope

Trie Insert

AlgorithmintermediateTrie Operations

Walk existing character edges, create the missing ones, and mark the final node terminal.

Decision · step 2 of 19Trie: Insert words sharing prefixes
•cnode

"car", letter 'c'. No child 'c' yet, so create one and step into it.

Open in the player →or start at step 2

What you will see

Focus follows shared prefix edges, then new nodes sprout for the rest of the word.

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

Leads to

Topics that need this one first.

Taught by the same lesson

Trie covers these too, in the same run.