Structure of a Trie
Explore the basic structure of a trie and understand how to build a TrieNode and Trie class in C++. Learn how each node represents an alphabet and how the isEndWord flag helps in word searches.
We'll cover the following...
We'll cover the following...
Introduction
In this lesson, we will take a look at the basic structure of a trie and then build a class in C++ based on what we’ve studied.
Trie containing "top", "thus" and "their".
The Trie Node Class #
The node of a trie represents an alphabet. For example, if we want to insert “hello” in the Trie, we will need to add 5 nodes, one ...