How is this O(n)?

For deleting any arbitrary element from a min heap in what best complexity you can achieve this?

O(1)

O(logN)

O(N)

hello @haseebshaik00

another explanation -> first find the arbitrary element in the heap which is O(N) and then delete it which is log(n).
in total O(n+ logn) -> O(n)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.