Introduction
When we are talking about data structures, the name that we cannot forget is Tree. The tree is a very important data structure, useful in all aspects of storing data in a hierarchical manner. When we talk about trees in detail, then the classification of trees is an important thing to discuss. For now, we will only discuss one classification of the tree, i.e., the Binary Tree.
This article will help us understand the Binary Tree and its properties. So let's start to enhance our knowledge about Binary Trees.
Binary Trees
A tree in which all the nodes do not have more than two children is called a Binary Tree.
Example:

An example of Binary Tree
Below are some terminologies related to Binary Tree:
-
Root Node: A Binary Tree consists of a unique node called the root node. The rest of the nodes are said to constitute its subtree. In fig 1, the node with value 3 is the root node, and other nodes constitute its subtree.
-
Left Child: The node which is pointed by a node in its left is called its left child. In the above example, the node with the value 5 is the left child of the root node.
-
Right Child: Similarly, the node pointed by a node in its right is called its right child. In the above example, the node with the value 9 is the right child of the root node.
-
Parent Node: Every node is pointed by some node except for the root node; that node is known as its parent node. For example, the root node is the parent node for nodes with values 5 and 9.
-
Left Subtree: The tree whose root node is the left child of some node is called the left subtree of that node.
-
Right Subtree: The tree whose root node is the right child of some node is called the right subtree of that node.
-
Level of a Node: In easy words, the level of a node can be recognized as its distance from the root. The root level is said to be zero, and the level of the parent node is always one less than the child node.
-
Height or Depth of a Tree: The height or depth of a Binary Tree can be defined as the maximum number of nodes in a branch of the tree. We can also define the maximum number of nodes in a Binary Tree of depth ‘x’ as ‘2x - 1’. The depth of the root node is said to be one.
- Leaf Node: The node that does not have any child is known as Leaf Node.






