5,340 views

1 Answer

Best answer
9 9 votes
The deletion of a random node would take $O(n+log(n))$ as first we will find where the random element is in the heap which will take $O(n)$ and then delete it which will further take $O(log(n))$
• selected by
Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
928
928 views
Shashank Chavan asked Dec 18, 2015
928 views
Is it possible to delete intermediate node/number in Heap? Not a root or last.
4 4 votes
1 1 answer
2.8k
2.8k views
Gaurab Ghosh asked Jan 18, 2017
2,783 views
If you are given a sorted list with n elements in ascending order. Then what will be the Time complexity to build a Min heap from the given array?
8 8 votes
3 3 answers
5.9k
5.9k views
Kapil asked Sep 4, 2016
5,925 views
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...
1 1 vote
1 1 answer
1.6k
1.6k views