View on GitHub

reading-notes

Trees

Trees are data structures that have their limitations, but also their pros, like being fast in certain data gathering tasks.
They are defined as a data structure that uses Nodes that reference their “children” nodes, and this starts from a single point called the “root”, which is a node that is saved in the tree class/somewhere we can reference.
Trees sometimes have a set number of children, most notably the “binary” tree which only has two children max, which are called a “left” and a “right” in any node, a binary tree needs to have a certain structure, usually the right node is bigger than the current node, and the left is smaller.

Go back to table of contents