[leetcode]Meeting Rooms II
将时间点排序就行
class Solution: def minMeetingRooms(self, intervals: List[List[int]]) -> int: points = [] for interval in intervals: points.append([interval[0], 1]) points.append([interval[1], -1]) points.sort() result = 0 cnt = 0 for point in points: cnt += point[1] result = max(result, cnt) return result