1,647 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,260 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 ...
2 2 votes
1 1 answer
163
163 views
GO Classes asked Jul 21
163 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...
4 4 votes
2 2 answers
158
158 views
GO Classes asked Jul 21
158 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,...
4 4 votes
2 2 answers
173
173 views
GO Classes asked Jul 21
173 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,...