Which of the following is the correct property of a min-heap ?
2025
Which of the following is the correct property of a min-heap ?
- A.
The key at a parent node is greater than or equal to the keys of its children
- B.
The key at a parent node is less than or equal to the keys of its children
- C.
The tree is always balanced
- D.
The tree is always complete
Attempted by 80 students.
Show answer & explanation
Correct answer: B
In a min-heap, every parent node has a key less than or equal to its children's keys. This ensures the smallest element is always at the root, allowing efficient retrieval of minimum values.