Dashboard
LC #252

Meeting Rooms

Pattern · ?AmazonGoogleMetaBloombergMicrosoft

Problem

Given an array of meeting time intervals, determine if a person can attend all meetings.

Constraints

  • 0 ≤ n ≤ 10⁴
  • 0 ≤ startᵢ < endᵢ ≤ 10⁶

Example

Input
intervals = [[0,30],[5,10],[15,20]]
Output
false
Why
[0,30] overlaps with [5,10] — impossible to attend both

Spot the pattern

Which pattern cracks it?

Hints

One at a time
Solve on LeetCode ↗