The Structure of a Trie

This lesson covers the structure of a Trie class, including TrieNode and how all of this information is programmed in Java.

Introduction

Previously, we discussed a few properties that a Trie must hold in order to improve the performance. In this lesson, we will take a look at the basic structure of Trie and then build a class in Java with the help of these concepts.

Representation of a Node

A node in a Trie represents a letter in an alphabet. For example, if we want to insert “hello” in the Trie, we will ...