Question: ( 7 5 pts ) MaxHeap to MinHeap: Using the MaxHeap class provided in 2 7 . 4 , ( based on the ADT Heap

(75 pts) MaxHeap to MinHeap:
Using the MaxHeap class provided in 27.4,(based on the ADT Heap specified in 27.1,) plus the add() method specified in 27.8 as a starting point, show what changes must be made to convert the code into a MinHeap class. Submit any analysis of pseudocode in a Word .docx or Java code in a .Java file (but not both!). Include comments indicating the changes! Your code, if submitted, does not have to run. Only indicate what should be changed to get a MinHeap, and only include the code affected by your conversion! You do not have to submit the entire MaxHeap/MinHeap class.
(25 pts) After removing the max entry in a maxHeap, what remains is a semiheap (27.10). Describe a semiheap in detail. Is a semiheap also a heap, or does it contain a heap? Explain!

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 Databases Questions!