Meeting Calendar

Languages

Given an array of meeting time intervals where each element represents a meeting time as [start, end], determine whether a person can attend all the meetings without any overlap between meeting times.

Input

  • A 2D array of integers intervals of size n x 2, where n is the number of meetings and each interval [start, end] represents a meeting starting at time start and ending at time end

Examples

Input: intervals = [[83,99]]
Output: true
Explanation: There is only one meeting, so there is no possibility of overlap.
Input: intervals = [[1,5],[5,10],[10,15]]
Output: true
Explanation: The meetings are back-to-back but do not overlap.
Input: intervals = [[8,10],[1,3],[2,6],[15,18]]
Output: false
Explanation: The meetings [1, 3] and [2, 6] overlap, so it is not possible to attend all meetings.

Constraints

  • 0 <= intervals.length <= 1000
  • intervals[i].length == 2
  • 0 <= start < end <= 1,000,000
The Component Library Procrastinator Tee — Why reuse when you can rebuild?Sponsor: SwagOverflow
The Component Library Procrastinator Tee — Why reuse when you can rebuild?

A true front end engineer never reuses, they only reinvent. This sleek black tee sums up the reality of constantly rebuilding component libraries instead of using the one from last month. Clean, sharp, and painfully accurate, it's the perfect fit for devs who can't resist a fresh start.

Get yours now ->

The Component Library Procrastinator Tee — Why reuse when you can rebuild?Sponsor: SwagOverflow
The Component Library Procrastinator Tee — Why reuse when you can rebuild?

A true front end engineer never reuses, they only reinvent. This sleek black tee sums up the reality of constantly rebuilding component libraries instead of using the one from last month. Clean, sharp, and painfully accurate, it's the perfect fit for devs who can't resist a fresh start.

Get yours now ->