AlgoViz

Trie (prefix tree)

medium 20 min

A trie (pronounced "try") is a tree that stores strings one character per level, so words with the same opening letters share the same path from the root.

Check yourself

One question at a time. Each answer explains why.

Question 1 of 10

Score 0
applied

After inserting "app" and "apple" into an empty trie, how many nodes are there, including the root?

Pick an answer to see why.

Flashcards

Say your answer, then reveal it.

Card 1 of 11

Recall

What is a trie?

Say your answer, then reveal it.

These cards come back in Today, just before you would forget them.