<DS/>DS_VISUALIZER
FoundationsOOPArraysLinked ListStacksQueuesTreesGraphsHashingStrings
exploreExplore
homechevron_rightTopicschevron_rightTreeschevron_rightTrie
spellcheck

TREES · TRIE

Trie

Words as letter-paths; shared prefixes share nodes.

Choose an operation

add_boxarrow_outward

Insert

Create the letter path; ring the end.

O(L)O(L)◍ 0/6
searcharrow_outward

Search

Follow letters; found ⇔ end ring.

O(L)O(1)◍ 0/6
deletearrow_outward

Delete

Un-ring, then prune unused letters.

O(L)O(1)◍ 0/6