The problem. Given an array of meeting time intervals [start, end], decide whether one person could attend all of them — that is, whether no two meetings overlap. A meeting that ends at 10 doesn't clash with one that starts at 10.
[[0,30], [5,10], [15,20]] -> false (5-10 overlaps 0-30)
[[7,10], [2,4]] -> true
[[1,5], [5,8]] -> true (one ends as the other starts)Members only · free account
The rest of this lesson, with 6 more sections, 1 drawing, a dry-run simulator and code in JavaScript, Python, Java and C++, opens with a free account.
Not ready yet? The Arrays course is free to read, no account needed.
In the rest of this lesson