Tree

A tree is a recursive data structure with a single root node and zero or more child nodes. It is also a special case of graph. Each link between a node is called an edge.

Properties of trees

Types of Trees

Binary trees

There are a few types of binary trees.

In a perfect binary tree, the number of nodes is log(height + 1).

Traversing Trees