Question 14353 – DSSSB PGT 2018 Female
April 3, 2024Question 10918 – Match-the-following
April 4, 2024GATE 2015 [Set-2]
Question 19
|
Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is
Ω(logn)
|
|
Ω(n)
|
|
Ω(nlog n)
|
|
Ω(n2)
|
Question 19 Explanation:
Since left and right subtree is already a heap. So we can apply Heapify (node) which take log n time.
Correct Answer: A
Question 19 Explanation:
Since left and right subtree is already a heap. So we can apply Heapify (node) which take log n time.