Watch a calendar day booked into the fewest rooms: sort meetings by start, keep a min-heap of when each room frees up, and reuse the earliest room the moment it is free. O(N log N) time, O(N) space.
Given a day of meetings, find the fewest rooms that hold them all. Sort the meetings by start time and keep a min-heap of the times the booked rooms free up.
Take the meetings in the order they begin. Each one only has to fit around the meetings that started before it.
Every booked room is one end time in a min-heap. Its top is the earliest any room becomes free, so it is the only room worth checking.
If the earliest end is at or before the meeting's start, that meeting is over: pop it and give its room to the new one. A meeting ending at 10:30 frees its room for one starting at 10:30. That is why the check is <=, not <.
If even the earliest room is still busy, every room is. Open a new one. Either way, push the new meeting's end time.
The heap never shrinks: a reuse pops one end and pushes another. So its size at the end is the number of rooms ever opened, which is the most meetings running at once.