Question DSA-HEAP-0023
EasyIs the array [10, 5, 15] a valid min-heap (index 0 is the root)?
- A.
It can't be decided
- B.
No, because 5 is smaller than its parent 10
- C.
Show answer and explanation
Answer: B
In a min-heap a child must not be smaller than its parent.