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.
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 endInput: intervals = [[83,99]]Output: trueExplanation: There is only one meeting, so there is no possibility of overlap.
Input: intervals = [[1,5],[5,10],[10,15]]Output: trueExplanation: The meetings are back-to-back but do not overlap.
Input: intervals = [[8,10],[1,3],[2,6],[15,18]]Output: falseExplanation: The meetings [1, 3] and [2, 6] overlap, so it is not possible to attend all meetings.
intervals.length
<= 1000intervals[i].length
== 2start
< end
<= 1,000,000Given 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.
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 endInput: intervals = [[83,99]]Output: trueExplanation: There is only one meeting, so there is no possibility of overlap.
Input: intervals = [[1,5],[5,10],[10,15]]Output: trueExplanation: The meetings are back-to-back but do not overlap.
Input: intervals = [[8,10],[1,3],[2,6],[15,18]]Output: falseExplanation: The meetings [1, 3] and [2, 6] overlap, so it is not possible to attend all meetings.
intervals.length
<= 1000intervals[i].length
== 2start
< end
<= 1,000,000console.log()
语句将显示在此处。