Merge Intervals
LC #252Easy
Meeting Rooms
Merge Intervals
AmazonGoogleMetaBloombergMicrosoftProblem
Given an array of meeting time intervals, determine if a person can attend all meetings.
arraysortingmerge-intervals
Constraints
- ›0 ≤ n ≤ 10⁴
- ›0 ≤ startᵢ < endᵢ ≤ 10⁶
Example
Input
intervals = [[0,30],[5,10],[15,20]]Output
falseWhy
[0,30] overlaps with [5,10] — impossible to attend both