UGC-NET | UGC NET CS 2017 Jan – II | Question 23

Which of the following is a valid heap ?
(A)b
(B)b1
(C)b2
(D)b2 (1)
(A) A
(B) B
(C) C
(D) D


Answer: (B)

Explanation: For a heap to be valid, either it should be max heap or a min heap.
b2 (1) (1)
only this heap is valid and it is a max haep.
So, option (B) is correct.

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.