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

Explain.
edited by

1 Answer

Best answer
1 votes
1 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

Related questions

0 votes
0 votes
1 answer
1
Ramayya asked Jan 7
176 views
Worst case time complexity of heap sort for n elementsO(nlogn)O(logn)O^2O(n)
1 votes
1 votes
1 answer
2
go_editor asked Mar 26, 2020
626 views
How much extra space is used by heapsort ?$O (1)$$O (\log n)$$O (n)$$O (n^2)$