Skip to content

Binary Trees

A binary tree is a special type of tree, where each node of a tree has atmost 2 child nodes, called the left node and the right node, respectively and order matters.

One more important property is that except the root of the tree has a unique parent.

Binary Tree

Binary Tree

Important Notations in Binary Tree

  • Size of a tree: Number of nodes
  • Height of a tree: Number of edges in the longest path of the tree or Number of levels of the tree with the level of root equal to 0.
  • Leaf nodes: A node that has no children.