Thursday, March 14, 2013

Representation of Binary Tree


Representation of Binary Tree
          Binary tree can be stored in memories in three ways

  1. Sequential Storage representation
  2. Linked Storage representation
  3. Thread storeage representation
1.  Sequential Storage Representation
         Here we represent thre trees using arrays. Consider the binary tree shown below:

The Sequential Storage representation of above tree is

The Storage leads to a large amount of memory wastage.  Sequential representation is good only for both complete binary tree and full binary trees.  Consider a full binary tree or complete binary tree.


 Sequential Representation


Insertion and Deletion of nodes from sequential representation of trees is tedious.


2 comments:

  1. hey u moron......where is linked list representation of binary tree....???
    if u don't know ABCD of representation then why r u here to show us ur knowledge........????

    ReplyDelete
    Replies
    1. Go through www.kurvaramudu.blogspot.in regarding query on trees. And think on comments put on me.

      Delete