Notice Period

Clash-Free Calendar

easy

Your calendar app just imported a day's worth of meetings, each [start, end] in minutes. One person, one body: before showing the schedule, the app must check whether the day is even physically possible.

Return True if no two meetings overlap, otherwise False. A meeting ending exactly when the next begins is fine — sprint out of one room, into the next.

Example 1
in meetings = [[0, 30], [5, 10], [15, 20]]
out False
[0, 30] swallows both of the others.
Example 2
in meetings = [[7, 10], [2, 4]]
out True
Sorted: [2, 4] then [7, 10] — a clean gap between them.
Constraints
  • · 0 <= len(meetings) <= 2000
  • · 0 <= start < end <= 10^6
similar problem on LeetCode ↗
solution.pyloading python…
test results
Hit ▶ Run to test your code against the visible cases.