Computer Sciences > Gate 2015 Set-3 > Array
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
〈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
Correct : Array
Similar Questions
Let A be an array of 31 numbers consisting of a sequence of 0’s followed by a sequence of 1’s. The problem is to find the smallest index i such that A[i] is 1 b...
Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is _...
Consider the following C program.
#include <stdio.h>
int main () {
int a[4][5] = {{1, 2, 3, 4, 5},
{6, 7, 8, 9, 10...
Total Unique Visitors
Loading......