Algomination
Data Structures
AboutContact

Algomination

Learn algorithms and data structures through smooth, interactive visualizations.

SortingSearchingArray AlgorithmsData StructuresAboutContact

© 2026Algomination. Created by Omang Rawat & Rahul Soni.

Omang Rawat
Rahul Soni
All data structures

Trie (Prefix Tree)

Ops O(L)Space O(n)

Stores strings character by character so words with shared prefixes share a path. Insert, search, and prefix-match all run in O(L) for a word of length L.

d
r
t
a
c
g
o
d
•
A trie stores strings character by character. Shared prefixes share a path from the root.
VisitingMatched pathEnd of word

About Trie (Prefix Tree)

Stores strings character by character so words with shared prefixes share a path. Insert, search, and prefix-match all run in O(L) for a word of length L.

Time complexity: O(L). Space complexity: O(n).

Use the interactive visualizer above to run Trie (Prefix Tree) on your own input and watch every comparison, swap, and operation animate step by step — pause, scrub, or replay at any speed.