Question: Need help on this one. Thx This question is about the array-based heap representation that is discussed in the textbook. We assume that keys are
Need help on this one. Thx

This question is about the array-based heap representation that is discussed in the textbook. We assume that keys are integers. Consider the following array dotof ). Note that this array is used as an underlying storage of a heap but it may violate the heap-order property. 0 1 2 3 4 5 6 7 8 C 10 11 13 28 19 37 48 30 25 40 15 89 50 41 Suppose you run the following method with the input argument / = 8. =Method(int i) { while (i > off int j = parent(i); // j is the parent node of node i if (data[i] > data) break; int temp = data; data[i] = data data [i] = temp; What is the value of the element in doto[0]? Choose one. O a. 28 O b. 15 O C. 48 O d. 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
