+1 vote
in Data Structures & Algorithms I by (88.2k points)
Min heap is a complete binary tree.

(a) True

(b) False

My question comes from Heap topic in portion Heap of Data Structures & Algorithms I

This question was addressed to me by my school teacher while I was bunking the class.

1 Answer

+1 vote
by (737k points)
selected by
 
Best answer
Right option is (a) True

The best explanation: A tree, in which all levels are fully filled, except possibly the last level, is called as the complete binary tree. And min heap maintains shape property, so it is a complete binary tree. The shape property ensures that all levels in the min heap are fully filled, except the last one, and, if the last level is not filled completely, then fill the elements from left to right.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...