Question: When constructing a heap using an array structure, the left child index and the right child index of the node at index i are given

When constructing a heap using an array structure, the left child index and the right child index of the node at index i are given by the formulas
Question 9 options:
Left child at index (2i -1), right child at index (2i +1)
Left child at index (i +1), right child at index (i+2)
Left child at index (2i +1), right child at index (3i+1)
Left child at index (2i +1), right child at index (2i+2)

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!