

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Assignment No. 05
SEMESTER Spring 2012
CS301 ‐ Data Structures
Total Marks: 20
Due Date: July 06, 2012
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).
For clarity and simplicity, You are required to Upload/Submit only MS Word 2003 (*.doc) file.
The objective of this assignment is
o To make you familiar with Complete Binary tree. o To make you familiar with Heap data structure.
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.
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.