Question: Build a heaparray structure by adding the following items in order to an array. As you add each item show the result after you re-heap

Build a heaparray structure by adding the following items in order to an array. As you add each item show the result after you re-heap the structure. Show EACH addition in a separate addition of the heap construction process. Your final array should show your heap array with 10 items in cells. EVERY time you move an item, make sure to show that move.

Array is {18, 31, 4, 17, 22, 6, -5, 17, 9, 30}

If you prefer, you may build a heap using the items in order from the input, and then transfer that heap to an array structure. Show the final heapified array.

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!