214 views
1 1 vote

Given the structure of a heap as sketched below, where the second-smallest value in the set is marked.
Tell the total valid position for 4th smallest value in the Min heap 
Assume that there are no duplicate node values.

 

1 Answer

Position:
Show:

Related questions

4 4 votes
1 1 answer
212
212 views
GO Classes asked Jul 28
212 views
Suppose vector $A$ is a min-heap:$A = [2, 4, 3, 6, 7, 3, 5, 8, 9]$After calling $\texttt{Push(1)}$, what is the final heap array?$[1, 2, 3, 6, 4, 3, 5, 8, 9, 7]$ $[1, 4, ...
3 3 votes
2 2 answers
223
223 views
GO Classes asked Jul 22
223 views
Given a binary min-heap storing $n$ comparable keys, can we always build a Set AVL Tree containing the same keys using only $O(n)$ comparisons?True False
4 4 votes
1 1 answer
157
157 views
GO Classes asked Jul 22
157 views
Consider the following min-heap where each node is written as $\texttt{(value, priority)}$:Now perform these operations in order:$\texttt{updatePriority(A, 8)}$ $\texttt{...
5 5 votes
1 1 answer
157
157 views
GO Classes asked Jul 22
157 views
Insert the following values one by one into an initially empty minimum binary heap:$$10, 12, 1, 14, 6, 5, 8, 15, 3, 9$$What is the final heap array in level-order?$[1, 3,...