Ctrl K

Make It to Every Meeting

Easy
An employee's calendar holds meetings: meetings[i] = [start, end] means a meeting runs from time start to time end. The employee cannot be in two meetings at once, but if one meeting ends exactly when another starts, they can make both. Return True if they can attend every meeting, and False otherwise. The meetings are listed in no particular order.
Example 1
meetings=[[9, 10], [13, 15], [10, 12]] → True

The meetings run back to back: 9–10, 10–12, 13–15. Ending at 10 and starting at 10 is fine.

Example 2
meetings=[[14, 16], [8, 11], [15, 17]] → False

The meetings 14–16 and 15–17 overlap, so both cannot be attended.

Example 3
meetings=[] → True
Constraints
  • 0 ≤ len(meetings) ≤ 10⁵
  • 0 ≤ start < end ≤ 10⁶
Have you seen this problem in a real interview?
Solved by0
Tried by0
Submissions0
Acceptance—
Topics
Similar problemsMerge Into the Spare Tail EasyThe Candidate With Most Votes EasyDoes Any Value Repeat EasyThe Lost Ticket EasyValues in Both Lists Easy
loading Python…
Input
meetings=[[9, 10], [13, 15], [10, 12]]
Expected
True

Run checks the first 3 tests in your browser. Submit checks all 94 tests on the server, hidden ones included.