A trie (prefix tree) stores a set of strings so that each node is a prefix and each edge adds one character. Insert, search and prefix queries walk one path of length equal to the word. It makes autocomplete natural: find the prefix node, then list what lies below it.