Structure of a Trie

Learn about the structure of the trie class in C# from this lesson.

We'll cover the following...

Introduction

In this lesson, you will take a look at the basic structure of a trie, and then build a class in C# based on what you have studied.

g t t o o t->o h h t->h p p o->p u u h->u e e h->e s s u->s i i e->i r r i->r Root Root Root->t
Trie containing "top," "thus," and "their."

The trie node class

The node of a trie represents an alphabet. For example, if you want to insert “hello” in the trie, you will need to add 5 nodes; ...