Data Structures | Heap | Question 9
In a binary max heap containing n numbers, the smallest element can be found in time
In a max heap, the smallest element is always present at a leaf node. So we need to check for all leaf nodes for the minimum value. Worst case complexity will be O(n)
12 / \\ / \\ 8 7 / \\ / \\ / \\ / \\ 2 3 4 5
Quiz of this Question
Please comment below if you find anything wrong in the above post
My Personal Notes arrow_drop_up
Please Login to comment...