Greedy Algorithms8 sections · 316 units
Open in Course

Problem - Meeting Rooms I

Can attend all?

Given meeting times, determine if a person can attend all meetings.

Here's simpler than activity selection: you just need to check if any two meetings overlap. If max non-overlapping < total meetings, the answer is false.

But there is a simpler approach: sort by start time and check adjacent pairs. If any meeting starts before the previous ends, you cannot attend all. You do not need to count; you just need to detect any conflict. One overlap is enough to return false.