Skip to main content

Meeting Rooms

Question

None

Example 1
Input: [[0, 30], [5, 10], [15, 20]]
Output: false

Solution

all//Meeting Rooms.py


def canAttendMeetings(intervals):
intervals.sort(key=lambda x: x[0])

for i in range(1, len(intervals)):
if intervals[i][0] < intervals[i-1][1]:
return False
return True