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 or via email.
o
The submitted
assignment is other than .doc or .docx 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 ONE .doc
or .docx file.
Objective
The objective of this assignment is
o
To make you
familiar with the concept of a Complete binary tree and Heap Data structure.
GOOD
LUCK
Problem Statement:
Heap is a complete binary tree that conforms to the heap order.
The heap order is a property that states that in a (min) heap for every node
X, the key in the parent is smaller than (or equal to) the key in X and in a
(max) heap for every node X, the key in the parent is greater than (or equal
to) the key in X.
Given below is an array representing a complete Binary tree.
|
|
2
|
3
|
4
|
6
|
16
|
19
|
24
|
8
|
11
|
20
|
23
|
30
|
|
Data
Array index 0
1 2 3 4 5 6 7 8 9 10 11
12 13
Note: The data elements in the array have
been stored, starting from index 1.
a)
You are required to draw a complete binary tree from the above-given array. After drawing a
tree, identify which type of heap data structure is it showing either min heap or max heap?
b)
Let’s suppose, we insert a new value at an array index 13 then draw a heap tree after inserting a new node. Also, show the changes done in the array.
|
|
2
|
3
|
4
|
6
|
16
|
19
|
24
|
8
|
11
|
20
|
23
|
30
|
1
|
Data
Array index 0
1 2 3 4 5 6 7 8 9 10 11
12 13
|
file??
ReplyDeletesolution file plz
ReplyDeleteProof Reading: It is always good to get your assignment read by Trusted PhD Thesis Writing Service some senior person. If you can't gather a senior person then ask your friends to do so.
ReplyDeleteThe "assignment book consistently returns home" rule is significant, on the grounds that guardians may track down that "no schoolwork" signifies there was no particular composed assignment, however ignores the way that a major test is planned for a few days and the instructor said schoolwork for that evening was "Study for the test."internship essay example
ReplyDeleteThis is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: Class 9 Assignment
ReplyDelete