Question: Part 1 ( Programming is not required for this part. ) ( A ) Add the following integers into an empty minheap in order. Draw

Part 1(Programming is not required for this part.)
(A) Add the following integers into an empty minheap in order. Draw the resulting minheap. [2 marks]
(3440387633211215)
(B) Using the previous heap, perform a removeMin operation. Draw the resulting heap. [2 marks]
(C) Perform the following operations on an empty minheap in order. Draw the resulting minheap. [3
marks]
addElement(38)
addElement(23)
removeMin()
addElement(9)
removeMin()
addElement(7)
addElement(3)
removeMin()
addElement(43)
addElement(46)
(D) Do question (C) again, this time with a maxheap. [3 marks]
Note: Replace removeMin() with removeMax(). The "addElement" method will construct a maxheap.
please provide the drawings as well
Part 1 ( Programming is not required for this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!