Heap Quizz doubts

i did not understood the answers?

i got the first one but didn’t understood the second one.can you please explain it in detail

see the time complexity of finding a random element in heap == O ( N )
then deleting it cost O ( Logn )
since these are not nested operation have to be done sequence wise so
total complexity is addition of both
O ( N + logn )
since N is bigger so O ( N) is the worst case complexity

1 Like

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.