0% found this document useful (0 votes)
83 views7 pages

In The Name of Allah

This document summarizes the sequential representation of a binary tree in computer memory. It explains that the binary tree is first traversed level by level and then stored in an array of nodes. The root node is stored in position 1, and the left child of each node N stored at position k is placed at position 2k, while the right child is placed at position 2k+1. An example binary tree and its corresponding sequential representation are provided.

Uploaded by

Junaid khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views7 pages

In The Name of Allah

This document summarizes the sequential representation of a binary tree in computer memory. It explains that the binary tree is first traversed level by level and then stored in an array of nodes. The root node is stored in position 1, and the left child of each node N stored at position k is placed at position 2k, while the right child is placed at position 2k+1. An example binary tree and its corresponding sequential representation are provided.

Uploaded by

Junaid khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 7

IN THE NAME OF ALLAH

SEQUENTIAL REPRESTATION OF BINARY


TREE IN COMPUTER MEMORY

SADAF KALSOOM

DATE:4TH APR 2009


Sequential
representation of
binary tree
This type of storage, a binary
This type of storage, a binary
tree is firstly
Traversed by level by level and
then it is stored in an array of
nodes.
In this type of storage, the
root node is stored in position
1 while remaining nodes
Are stored in following criteria.
 First step is
(a) The root R of ‘T’ is stored
in TREE[1]
2nd step is
If node N occupies
Tree[k], then its left child
is stored in TREE[2*k],
 and its right child is
stored in TREE[2*k+1].
45

Tree Example 22 77

11 30 90

15 25 88

4 2 7 1 3 9 15 25 8
51 22 73 14 05 6
07 8 9 1 11 12 13 14
815 16
0
Have a nice
day!

You might also like