Question: Q . 3 . ( 3 0 pts ) You are given an array as given below. You are expocted to create a heap from
Q pts You are given an array as given below. You are expocted to create a "heap" from scratch in
a and then make a heapsort by using that array in b You will use "ArrayMaxHeap" as mentioned in the
class which is array implementation of heap. The array is:
Qa pts Using the array above and create a heap using the code below. The "heapCreate method
below is the same method that is used anytime. Each step in the loop must be shown graphically, in other words
you will first deploy the initial array into the tree, and then graphically, as the loop iterates, draw the heap
creation progress for each loop. Final heap and its array representation must be shown.
heapRebuild in heapCreate works in the same way shown and used throughout all the classes.
You can iterate the loop as needed. Final hean and its array rennesentation must be shown
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
