Greedy Algorithms8 sections · 316 units
Open in Course

Activity Selection vs Meeting Rooms

Different questions

These problems look similar but ask different things:

ProblemGoalApproach
Activity SelectionMax non-overlappingSort by end, greedily select
Meeting Rooms IAny overlap?Sort by start, check adjacent
Meeting Rooms IIMin rooms for allCount max simultaneous

Recognize which question is being asked. The algorithm changes based on the goal. Mixing them up is a common interview mistake.