Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

GATE CS 2017 Max Heap

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

View answer

3

Practice Problem

Consider the following array of elements. 〈89, 59, 50, 17, 12, 15, 20, 5, 7, 11, 8, 9, 60〉. The minimum number of interchanges needed to convert it into a max-heap is

Leave a Comment