Guided lesson

Tries

Trees

Tries

Core

Mental model

  • Good for prefix queries.

Operations

insert O(L)

Cost shape

O(word length)

Watch out

Forgetting an end-of-word marker.

Related algorithms

Trie Insert and SearchWord Search
Guided progression
10% lesson
Step 1 / 2Learner goal
Speech settings Speed 1.0 · Volume 90%

Keyboard: Space play/pause · Arrow keys step · Page Up/Down change sections · R restart