Trie

noun

say it: “TRY” /traɪ/

A tree that stores words one letter per node, so words with the same beginning share a path.

What is a trie?

A trie (said like "try") stores words letter by letter, one letter per node, so words that start the same share the same path: cat, car and card share c and a. Finding a word takes one step per letter, however many words it holds.

In a sentence

  • “The keyboard keeps its dictionary in a trie, so every word starting with car is under one node.”

Level: Journeyman · More Data Structures terms at this level

Updated