dsa · easy
Can Attend Meetings
GreyOrangeArraySortingGreedyFoundation
intervals[i] = [start, end). Return whether they are pairwise non-overlapping. Touching endpoints are OK ([0,5] then [5,10]).
Arguments
intervals— list of[start, end)intervals
**Example:** [[0,30],[5,10],[15,20]] → false.
Constraints
0 <= intervals.length <= 1000 Hidden tests include near-max size for this bound; a slower-than-intended solution TLEs.
Examples
Example 1
Input: [[0,30],[5,10],[15,20]] Expected: false
Example 2
Input: [[7,10],[2,4]] Expected: true