Question 14353 – DSSSB PGT 2018 Female
April 3, 2024
Question 10918 – Match-the-following
April 4, 2024
Question 14353 – DSSSB PGT 2018 Female
April 3, 2024
Question 10918 – Match-the-following
April 4, 2024

GATE 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

A
Ω(logn)
B
Ω(n)
C
Ω(nlog n)
D
Ω(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.

Leave a Reply

Your email address will not be published. Required fields are marked *