Book Image

Learning JavaScript Data Structures and Algorithms

By : Loiane Avancini
Book Image

Learning JavaScript Data Structures and Algorithms

By: Loiane Avancini

Overview of this book

Table of Contents (18 chapters)

Chapter 8. Trees

So far in this book, we have covered some sequential data structures. The first non sequential data structure we covered in this book was the Hash Table. In this chapter, we will learn another non sequential data structure called a tree, which is very useful for storing information that needs to be found easily.

A tree is an abstract model of a hierarchical structure. The most common example of a tree in real life would be a family tree, or a company organizational chart as we can see in the following figure: