Overview of different types of tree
There are different types of tree data structures, each one with their own benefits and implementations. We are going to have a quick look over the most common ones so we can gain a good overview of the different types and choose which one to use in each case wisely.
After the following introduction to the different types of trees, we will go deeper into the details, properties, uses, and implementations.
Binary tree
This is the most basic type of tree to start with. A binary tree is a tree data structure in which any node has at most two children.
In a binary tree, the data structure needs to store values and references inside each node, contain a value key, and potentially, a reference to the parent (except the root), a left reference to a child, and a right reference to another child.
When a node doesn't have a parent, a left child, or a right child, the reference to that element exists, but it contains NULL/nil value.
Binary tree data structure