hat are the Types of heaps?
Solution
Heaps can be classified into two types:
-
Max-Heap: In a Max-Heap, the key present at the root node must be greatest among the keys present at all of its children. The same property must be recursively true for all sub-trees in that Binary Tree.
-
Min-Heap: In a Min-Heap, the key present at the root node must be minimum among the keys present at all of its children. The same property must be recursively true for all sub-trees in that Binary Tree.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.