What is a Trie?

This lesson gives a brief introduction to tries, their properties, and common applications.

Introduction

We are going to look at a tree-like data structure that proves to be very 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.

The word trie is derived from “retrieval”. As you can guess, the main purpose of using this structure is to provide fast retrieval. Tries are mostly ...