Data Structure: Unit III: Trees

Types of Binary Tree

ADT Data Structure

A full binary tree is a tree in which every node has zero or two children.

Types of Binary Tree

Full Binary Tree

•. A full binary tree is a tree in which every node has zero or two children.

• In other words, the full binary tree is a binary tree in which all the nodes have two children except the leaf node.

Complete Binary Tree

• The complete binary tree is a binary in which all the levels are completely filled except the last level which is filled from left.

• There are two points to be remembered

1) The leftmost side of the leaf node must always be filled first.

2) It is not necessary for the last leaf node to have right sibling.

• Note that in above representation, Tree 1 is a complete binary tree in which all the levels are completely filled, whereas Tree 2 is also a complete binary tree in which the last level is filled from left to right but it is incompletely filled.

Difference between complete binary tree and full binary tree



Left and Right Skewed Trees

The tree in which each node is attached as a left child of parent node then it is left skewed tree. The tree in which each node is attached as a right child of parent node then it is called right skewed tree.


Data Structure: Unit III: Trees : Tag: : ADT Data Structure - Types of Binary Tree