Problem. Given meetings [start, end) (a meeting ending at 10 frees its room for one starting at 10), return the minimum number of
rooms so that no two meetings in the same room overlap.
[[0, 30], [5, 10], [15, 20]] → 2
[[7, 10], [2, 4]] → 1
[[1, 5], [5, 8], [2, 6]] → 2 ([1, 5) and [5, 8) can share a room)
Lesson 14.4 chose which intervals to keep on one machine. Here every meeting must happen, and the question is how many machines. The answer is the largest number of meetings that overlap at any single moment: you need at least that many, and a greedy assignment never needs more.
ML context. Replace meetings with jobs and rooms with GPUs, and this is "how many GPUs does this schedule need?". Weight each interval by its memory and the same sweep computes peak memory: given each tensor's allocation and free step during a training step, the peak of the running sum is the memory the step needs. Activation-memory planners and compilers compute exactly this to decide what to recompute or offload (Change D).