Q30
Consider the following array of elements.
The minimum number of interchanges needed to convert it into a max-heap is
The minimum number of interchanges needed to convert it into a max-heap is
Show answer without attempting
Answer: D
GATE CS · Tree Data Structures · 3 questions
3 Binary Heaps questions from GATE CS papers (2015), each with the official answer key. Part of Tree Data Structures. Answer any question right here and it is marked straight away, or practise them one at a time.
Answer: D
| Array Index | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| Value | 40 | 30 | 20 | 10 | 15 | 16 | 17 | 8 | 4 |
Answer: B
Answer: A
0/30 correct0 marks