GATE CS 2015, set 3 · Question 30 · Programming and Data Structures · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
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
Answer (D)
Answer from the official GATE CS 2015 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes