Trees Introduction

Resources

Video Script

[Slide 1]

Our next data structure will be trees! Trees are a hierarchical structure and, as the name implies, trees are used to show hierarchies. These can include biologic classifications, like this dinosaur classification, work hierarchies, family trees, sports brackets and much more.

[Slide 2]

By comparison, strings and stacks are linear data structures. They contain data which has a defined linear order. In strings, we have exactly one character after another.

[Slide 3]

In trees, multiples items can follow a single item. For example, in this management structure the 1st Assistant Manager and the Shift Running Manager both work under the Restaurant Manager. In a linear structure, there would not be multiple types of positions reporting to the Restaurant Manager.

[Slide 5]

The goal of this module is to get us comfortable with the vocabulary related to trees and for us to implement a basic tree. In the next video, we will lay the foundation of tree vocabulary.