Tree

  • Uploaded by: Junaid khan
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tree as PDF for free.

More details

  • Words: 154
  • Pages: 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 If

step is

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 22

Tree Example

11 15 4 51

2 7 1 3 22 73 14 05

77 30

90

25

6

88 9 07

15 8

9

25 1 0

11

12 13 14

8 815

16

Have a nice day!

Related Documents

Tree
November 2019 45
Tree
November 2019 46
Tree
July 2020 20
Tree
May 2020 24
Tree
December 2019 30
Tree
April 2020 25

More Documents from "Junaid khan"

Bubble Sort
May 2020 22
Java 2
May 2020 14
Junaid (quick Sort)
April 2020 9
Binary Search
May 2020 11