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!