1,673 views
0 0 votes
a)Deletion of smallest element in heap

b)Insertion of an element in a heap will take

$O(n)$ or $O(logn)$ time?

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
0 0 answers
1.3k
1.3k views
Shiv Gaur asked Aug 20, 2018
1,283 views
How traversal in a heap takes place? Consider a min heap , I think we cannot traverse it like a binary tree ......For Example if we have to print all elements of heap ...
4 4 votes
1 1 answer
203
203 views
GO Classes asked Jul 21
203 views
A max-heap is stored using $0$-based indexing as:$$[60, 30, 45, 15, 5, 10, 20]$$During the first iteration of heap sort:Swap the root with the last element. Reduce the he...
5 5 votes
2 2 answers
193
193 views
GO Classes asked Jul 21
193 views
A min-heap is stored using $1$-based indexing as:$[2, 13, 7, 17, 14, 22, 8, 21]$After one $\texttt{DeleteMin}$ operation, what is the final heap array?$[7, 13, 8, 17, 14,...
5 5 votes
2 2 answers
204
204 views
GO Classes asked Jul 21
204 views
The following max-heap is stored using $1$-based indexing:$[57, 53, 42, 48, 25, 34, 29, 18, 30, 25]$Insert $55$ into this max-heap. What is the final heap array?$[57, 55,...