What is a Trie?
Explore the Trie data structure to understand how it enables fast retrieval and efficient string management. This lesson covers its properties, real-world applications like autocomplete, spell-checking, and contact searching, and explains how Tries share common prefixes to optimize searches.
Introduction
In the previous section, we covered several common types of trees, like Red-Black trees, 2-3 trees, etc.
Now, we are going to look at a tree-like data structure, which proves to be really efficient while solving programming problems related to strings.
This data structure is called a Trie and is also known as a Prefix Tree. We will soon find out why.
💡 Did you know?
Triebasically comes from the word “retrieval” ...