Recent questions tagged binary-heap

19 votes
1 answer
272
Which of the following sequences of array elements forms a heap?$\{23, 17, 14, 6, 13, 10, 1, 12, 7, 5\}$$\{23, 17, 14, 6, 13, 10, 1, 5, 7, 12\}$$\{23, 17, 14, 7, 13, 10, ...
28 votes
3 answers
274
The minimum number of interchanges needed to convert the array into a max-heap is$89, 19, 40, 17, 12, 10, 2, 5, 7, 11, 6, 9, 70$$0$$1$$2$$3$
23 votes
2 answers
275
A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?
21 votes
1 answer
276
20 votes
1 answer
279
23 votes
3 answers
280
79 votes
10 answers
282
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)$$\...
27 votes
3 answers
283
The elements $32, 15, 20, 30, 12, 25, 16,$ are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
44 votes
5 answers
284
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)$