1. Introduction to Binary Tree

A binary tree is a hierarchical data structure in which each node has at most two children, referred to as the left child and the right child. It is one of the most fundamental and widely used structures in computer science.

Binary Tree Terminology:

Properties of Binary Trees:


2. Types of Binary Trees

  1. Full Binary Tree: Every node has either 0 or 2 children.
  2. Complete Binary Tree: All levels are completely filled except possibly the last, which is filled from left to right.
  3. Perfect Binary Tree: All internal nodes have two children, and all leaf nodes are at the same level.
  4. Balanced Binary Tree: The difference in height between the left and right subtree of any node is at most 1.