Question: please finish question 1a la Objects in a (binary) mx-heap are indexed from 1, beginning at the root and continuing down the tree, as shown

 please finish question 1a la Objects in a (binary) mx-heap are

please finish question 1a

la Objects in a (binary) mx-heap are indexed from 1, beginning at the root and continuing down the tree, as shown in the diagram. The objects can be accessed by index, so H12] refers to the object in position 2 in a heap H. The number of objects in the heap is given by the attribute H.size. 1 2 3 4 6 i) How would you find the parent, the left child and the right child of object H[k]? ii) Describe a O(log2 H.size) algorithm to delete the object at position k in the heap. You do not need to write a coded procedure, but you should explain all steps that are required. Assume the objects in the heap have keys that can be compared, and that these keys determine the heap ordering

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!