Complete Binary Tree, Heap Data Structure-Data Structure-Assignment, Exercises of Data Structures and Algorithms

I am student at Baddi University of Emerging Sciences and Technologies. To help my friends in other universities, I am uploading my assignments of different courses. Its for Data Structure course. Other can see if they are searching following: Heap, Array, Index, Node, Tree, Binary, Parent, Child, Data, Structure

Typology: Exercises

2011/2012

Uploaded on 08/01/2012

parmitaaaaa
parmitaaaaa 🇮🇳

4.2

(111)

173 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AssignmentNo.05
SEMESTERSpring2012
CS301‐DataStructures
TotalMarks:20
DueDate:July06,2012
Instructions
Pleasereadthefollowinginstructionscarefullybeforesolving&submittingassignment:
Itshouldbeclearthatyourassignmentwillnotgetanycredit(zeromarks)if:
o Theassignmentissubmittedafterduedate.
o ThesubmittedassignmentisotherthanMSWord2003file.
o ThesubmittedassignmentdoesNOTopenorfileiscorrupted.
o Theassignmentiscopied(fromotherstudentordittocopyfromhandoutsorinternet).
Uploadinginstructions
Forclarityandsimplicity,YouarerequiredtoUpload/SubmitonlyMSWord2003(*.doc)file.
Objective
Theobjectiveofthisassignmentis
o TomakeyoufamiliarwithCompleteBinarytree.
o TomakeyoufamiliarwithHeapdatastructure.
GOODLUCK
Assignment Statement: Marks: 20
Question. 1 (10 Marks)
Consider the following MAX HEAP, represent this heap in the form of an array, start the array index from 1
instead of 0.
docsity.com
pf2

Partial preview of the text

Download Complete Binary Tree, Heap Data Structure-Data Structure-Assignment and more Exercises Data Structures and Algorithms in PDF only on Docsity!

Assignment No. 05

SEMESTER Spring 2012

CS301 Data Structures

Total Marks: 20

Due Date: July 06, 2012

Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if: o The assignment is submitted after due date. o The submitted assignment is other than MS Word 2003 file. o The submitted assignment does NOT open or file is corrupted. o The assignment is copied (from other student or ditto copy from handouts or internet).

Uploading instructions

For clarity and simplicity, You are required to Upload/Submit only MS Word 2003 (*.doc) file.

Objective

The objective of this assignment is

o To make you familiar with Complete Binary tree. o To make you familiar with Heap data structure.

GOOD LUCK

Assignment Statement: Marks: 20

Question. 1 (10 Marks)

Consider the following MAX HEAP, represent this heap in the form of an array, start the array index from 1 instead of 0.

docsity.com

Question 2. (10 Marks)

Consider the following array, the value on each index of this array represents the node value of a complete binary tree, you are required to create the complete binary tree from this array.

Hints: If “i” is an index of a node then “2i”, “2i +1” and “i/2” represent the left child, right child and parent of the this node respectively.

Lectures Covered: This assignment covers Lecture # 28 ‐ 33

Deadline: Your assignment must be uploaded/submitted at or before July 06, 2012

docsity.com