Explain the difference between a max heap and a min heap.
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: easy
Interview Round: Other
Overview: Explain how a max heap and a min heap differ and when to use each one. It tests the heap ordering rule, what sits at the root, and how to pick the right heap for tasks such as top-k selection, scheduling and heap sort.