Search results for heap

67 votes
14 answers
1
The number of possible min-heaps containing each value from $\{1,2,3,4,5,6,7\}$ exactly once is _______
113 votes
9 answers
2
The number of elements that can be sorted in $\Theta(\log n)$ time using heap sort is$\Theta(1)$$\Theta(\sqrt{\log} n)$$\Theta(\frac{\log n}{\log \log n})$$\Theta(\log n)...
79 votes
10 answers
3
In a min-heap with $n$ elements with the smallest element at the root, the $7^{th}$ smallest element can be found in time$\Theta (n \log n)$$\Theta (n)$$\Theta(\log n)$$\...
28 votes
6 answers
4
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 _________...
44 votes
5 answers
8
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
14 votes
3 answers
10
Which one of the following sequences when stored in an array at locations $A , \ldots, A[10]$ forms a max-heap?$23,17,10,6,13,14,1,5,7,12$$23,17,14,7,13,10,1,5,6,12$$23,1...
0 votes
1 answer
16
Worst case time complexity of heap sort for n elementsO(nlogn)O(logn)O^2O(n)
32 votes
5 answers
17
The number of binary min. heaps that can be formed from a set of 7 distinct integers is _________?
0 votes
1 answer
19
Consider the following array of elements<96,42,50,17,15,5,7,11,39,23,6,9,19,100,12>The minimum number of interchanges using buildheap needed to convert it into a max heap...
0 votes
1 answer
20
Consider the following algorithm for Build-Max-heap and the given array A=[ 47,96, 35, 54, 77, 65, 83]. Run this algorithm on the given array and redraw the heap and the ...