777 views
0 votes
0 votes

My question is in Question like find 5th Smallest element in a heap:

It requires O(logn) time if we do only Delete operation 5 Times.But what if the array contains no 5th smallest element say

our array contain [1,1,1,1,1,1,1,1,1,1]

now in this case we need to do extract min operation n number of times which would give nlogn time?

Plz Clear my doubt

https://gateoverflow.in/1110/gate2003-23

Please log in or register to answer this question.

Related questions

8 votes
8 votes
3 answers
2
Kapil asked Sep 4, 2016
3,892 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...
11 votes
11 votes
5 answers
3
Vikrant Singh asked Dec 28, 2014
3,611 views
What is the complexity of finding $50^{th}$ smallest element in an already constructed binary min-heap?$\Theta(1)$$\Theta (\log n)$$\Theta (n)$$\Theta (n \log n)$
1 votes
1 votes
1 answer
4