LeetCode 253 Meeting Rooms II - Solution

The core idea

Think of it as tracking concurrent meetings over time.

Create events: each meeting creates a "start" event and an "end" event. Sort all events by time.

Walk through events. On a start, increment rooms needed. On an end, decrement.

Track the maximum concurrent meetings. That's your answer.

Alternatively, use a min-heap to track when the earliest meeting ends.