Recent questions tagged binary-heap

1 votes
2 answers
61
Question The time required to find the 99th smallest element from a min heap of n elements is (given that we have access to the array elements)
0 votes
2 answers
62
Which of the following arrays do not represent a min heap. A. 1, 2, 4, 8, 12, 6, 7, 10, 11 7, 10, 12, 11, 17, 19, 2 25, 27, 28, 30, 32, 34, 27 90, 95, 100, 11...
2 votes
1 answer
63
The time required to determine the minimum element from the max heap of size O(log(n)) is given by
1 votes
2 answers
64
How many min heap possible with 6 distinct node?
3 votes
3 answers
66
In a binary max heap containing $n$ numbers, the smallest element can be found in ______$O(n)$$O(\log _2 n)$$O(1)$$O(\log_2 \log_2 n)$
1 votes
1 answer
67
2 votes
2 answers
70
1 votes
7 answers
71
28 votes
6 answers
72
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 _________...
0 votes
0 answers
74
Give an $O(n\lg\ k)$- time algorithm to merge $k$ sorted lists into one sorted list, where $n$ is the total number of elements in all the input lists. (Hint: Use a minhea...
0 votes
1 answer
75
The operation HEAP-DELETE$(A, i)$ deletes the item in node $i$ from heap $A$. Give an implementation of HEAP-DELETE that runs in $O(lg\ n)$ time for an $n-$element max-h...
0 votes
0 answers
76
0 votes
0 answers
77
0 votes
0 answers
79
Why do we bother setting the key of the inserted node to $-\infty$ in line $2$ of MAX-HEAP-INSERT when the next thing we do is increase its key to the desired value?
1 votes
0 answers
80
Write pseudo code for the procedures HEAP-MINIMUM, HEAP-EXTRACT-MIN, HEAP-DECREASE-KEY, and MIN-HEAP-INSERT that implement a min-priority queue with a min-heap.
0 votes
0 answers
83
0 votes
0 answers
85