Thursday, 23 November 2017

Type of Tree: A Non-Linear Data Structure

Tree are of different types in data structure. They all are in the categories of Non-Linear data structure. Below is the list of some types of tree: 
1. General Tree
2. Full Tree
3. Complete Tree
4. Binary Tree
5. Binary Search Tree
6. The Heap
Define Structure Node for the tree:
typedef struct node  *ptr_node;
sturct  node
{
short   data;
ptr_node   left_child;
ptr_node   right_child;
}

Graphical representation of Tree:



Definition of Binary Tree:
Definition: A binary tree is a finite set of nodes that is either empty or consists of a root and two disjoint binary trees called the left sub-tree and the right sub-tree.

Different types of Binary Tree:

1. Skewed Left Binary Tree 
2. Regular Binary Tree 
3. Skewed Right Binary Tree 

Graphical representation of different Binary Tree:


Thanks
Mukesh Rajput

No comments:

Post a Comment

Thanks
Mukesh Rajput