Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
262 B
6
Indexable
Never
class Solution:
    def canAttendMeetings(self, intervals: List[List[int]]) -> bool:
        intervals.sort()
        for i in range(len(intervals) - 1):
            if intervals[i][1] > intervals[i+1][0]:
                return False
        return True