Recent questions tagged binary-heap

0 votes
1 answer
241
What is the difference between the binary-search-tree property and the min-heap property? Can the min-heap property be used to print out the keys of an n-node tree in sor...
8 votes
3 answers
242
In a min-heap with n elements1). The 7th smallest element can be found in time, if duplicates are allowed ?2). The 7th distinct smallest element can be found in time, I...
0 votes
2 answers
243
how to merge two binary max heaps ?size of first heap is m+n and size of second heap is nand also find the complexity.
2 votes
2 answers
244
A max heap stores unique digits from 1 to 100 in an array.(total 100 elements)What is the maximum possible index number for element 92 ?
1 votes
2 answers
246
the time required to find 7th smallest element in min heap of size n vertices? solve and plz explain how?
3 votes
2 answers
247
The number of nodes in height h in any n-element heap is$h$$z^h$ceil $\biggl(\frac{n}{z^h} \biggr)$ceil $\biggl(\frac{n}{z^{h+1}} \biggr)$
1 votes
1 answer
248
The number of elements that can be sorted in time using heap sort ?
1 votes
2 answers
249
Given an unsorted Array of n elements and asked to find the Largest element of that array. Can we use Max-Heapify Procedure to find the Largest element in that array in O...
14 votes
2 answers
252
Let $H_1$ and $H_2$ be two complete binary trees that are heaps as well. Assume $H_1$ and $H_2$ are max-heaps, each of size $n$. Design and analyze an efficient algorithm...
0 votes
1 answer
253
$6.2-3$What is the effect of calling MAX-HEAPIFY(A,i) when the element A[i] is larger that its children?
1 votes
1 answer
258
What is the Best Case run time of Heap Sort ?A. $O(1)$B. $O(n)$C. $O(n \log n)$D. $O(\log n)$
0 votes
1 answer
261
0 votes
3 answers
264
32 votes
4 answers
265
Consider the following array of elements.$\langle 89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100 \rangle$The minimum number of interchanges needed to convert it into a ma...
28 votes
1 answer
266
Consider a max heap, represented by the array: $40, 30, 20, 10, 15, 16, 17, 8, 4$.$$\begin{array}{|l|l|}\hline \text{Array index} & \text{1} & \text{2} & \text{3} & \...
62 votes
4 answers
267
11 votes
5 answers
269