Question: Exercise 1 . In this exercise, we assume arrays start at index one. Recall that heaps can be seen as binary trees: the root is
Exercise
In this exercise, we assume arrays start at index one. Recall that heaps can be seen as binary trees: the root is A the left child of Ai is Ai and the right child of Ai is Ai
Which of the following arrays are heapstructured as maxheaps? Which ones as minheaps?
a A
b A
c A
Draw the heap after inserting into the heap A
If you insert an element into a heap with elements, which locations of the array could be altered in the course of the insert operation
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
