In a binary min heap with n elements, the 7th smallest element can be found in _____ ?
Answer given is O(logn)
and solution:-
Delete the 1st smallest element O(logn)
Delete the 2nd smallest element O(logn)
....
Delete the 7th smallest element O(logn).
So in total O(logn).
In this solution the data arrangement of the heap will be changed after performing these operation.
any better solution than this???