edited by
837 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

1 votes
1 votes
1 answer
1
Arjun asked Feb 16
2,368 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?$...
0 votes
0 votes
1 answer
2
Ramayya asked Jan 7
198 views
Worst case time complexity of heap sort for n elementsO(nlogn)O(logn)O^2O(n)