GeeksforGeeks » Interview Questions
HEAP
(2 posts)-
Which one of the following array sequences forms a heap?
a) 23,17,14,6,13,10,1,12,7,5
b) 23,17,14,6,13,10,1,5,7,12
c) 23,17,14,7,13,10,1,5,6,12
d) 23,17,14,7,13,10,1,12,5,7Could you please explain how do we know which sequence forms a heap?
-
Ans. C
make complete binary tree.
Reply
You must log in to post.