Multiple choice technology architecture

In a Heap tree

  1. Values in a node is greater than every value in left sub tree and smaller than right sub tree

  2. Values in a node is greater than every value in children of it

  3. Both of above conditions applies

  4. None of above conditions applies

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In a min-heap or max-heap, the key property is that each node's value is greater than (max-heap) or less than (min-heap) all values in its subtree. This parent-child relationship must hold down the entire tree, not just comparing with one subtree or sibling.