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