Cisco interview question

How do min-heap and max-heap work?