LC 253 — Problem

Given an array of meeting time intervals intervals where intervals[i] = [start_i, end_i], return the minimum number of conference rooms required.

Input: intervals = 030,510,1520
Output: 2
Input: intervals = 710,24
Output: 1

Constraints: 1 ≤ intervals.length ≤ 10⁴ · 0 ≤ startᵢ < endᵢ ≤ 10⁶

Picture a conference center on a busy Monday. Six meetings arrive, each with a start and end time. You are the scheduler. Your job: assign each meeting to a room. If a room is free when a meeting starts, reuse it. Otherwise, open a new one.

Assign all 6 meetings below. Pay attention to how much work each assignment takes — and what information you are tracking.

Meetings (sorted by start)
M1[0,30]← assign now
M5[2,8]
M2[5,10]
M4[7,25]
M3[15,20]
M6[18,23]

M1 030 — where does it go?