What is the difference between a Min-Heap and a Max-Heap?

What is the difference between a Min-Heap and a Max-Heap?

Approach: Compare node ordering rules.

In a Min-Heap, the root is the minimum element and every node is smaller than its children. In a Max-Heap, the root is the maximum and every node is larger than its children.

Follow-up: Which one is used for Heapsort to sort in ascending order?

Key concepts: root smallest, root largest.