FunctionRacerProblemsRace

Can Attend All Meetings

EasySorting and searchingPython, JavaScript, TypeScript, Java, C++

Each item of meetings is [start, end]. One person wants to attend all of them. A meeting that ends at the exact moment another one starts does not clash.

Return True if no two meetings overlap, otherwise False. The meetings are in no particular order.

Example 1

meetings [[0,30],[5,10],[15,20]]
returns false

[5, 10] happens during [0, 30], so False.

Example 2

meetings [[7,10],[2,4]]
returns true

They are apart, so True.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Sorting and searching problems