Thursday, August 21, 2025

Binary Tree Data Structure

 > organize the data in hierarchical structure.

 

Binary tree in dsa 
 
types of Binary Tree in Data Structure
 
    > Full Binary Tree
 
         A full binary tree is a tree where every node has either 0 or 2 children.
 
> Complete Binary Tree
   A complete binary tree is a tree where all levels are fully filled except possibly the last level, which is filled from left to right. 
 
 >Perfect Binary Tree
     A perfect binary tree is a tree where all internal nodes have exactly two children and all leaf nodes are at the same level.
   
  • Balanced Binary Tree

A balanced binary tree is a tree where the height of the left and right subtrees of any node differ by at most one.

 
  • Degenerate (or Pathological) Binary Tree

A degenerate binary tree is a tree where each parent node has only one child. This makes the tree look like a linked list.

 
 
 
 
 
 
 

No comments:

Post a Comment

Graph

 graph is non linear ds. it consisting of vertices and edges. it denote by G(V,E)  types null graph ( graph have no edges) trival graph ( ha...