Q. 18 Consider the following array of elements.
<89, 19, 50, 17. 12, 15, 2, 5, 7. 11, 6, 9, 100>
The minimum number of interchanges needed to convert it into a max-heap is
(A) 4
(B) 5
(C) 2
(D) 3
Answer: (D)
Explanation:
Q. 18 Consider the following array of elements.
<89, 19, 50, 17. 12, 15, 2, 5, 7. 11, 6, 9, 100>
The minimum number of interchanges needed to convert it into a max-heap is
(A) 4
(B) 5
(C) 2
(D) 3
Answer: (D)
Explanation: