• edited by
1,316 views
2 2 votes
What is the worst case time complexity of finding a element in max heap tree ?

Explain.

1 Answer

Best answer
2 2 votes
O(n).  Its just a heap. Not sorted. Suppose you are searching a number very close to least element. You have to search in the leaves. Hence O(n).
• selected by
Position:
Show:

Related questions

3 3 votes
3 3 answers
1.6k
1.6k views
admin asked Sep 28, 2024
1,582 views
Worst case time complexity of heap sort for $n$ elements?$O(n\log n)$$O(\log n)$$O({n}^2)$$O(n)$
29 29 votes
3 3 answers
19.4k
19.4k views
Arjun asked Feb 16, 2024
19,399 views
​​​​​An array $[82,101,90,11,111,75,33,131,44,93]$ is heapified. Which one of the following options represents the first three elements in the heapified array?$82,90,101$...