253. Meeting Rooms II
from sortedcontainers import SortedDict
class Solution:
def minMeetingRooms(self, intervals: List[List[int]]) -> int:
SD = SortedDict()
for [s, e] in intervals:
if s not in SD:
SD[s] = 0
if e not in SD:
SD[e] = 0
SD[s] += 1
SD[e] -= 1
res = 0
current = 0
for v in SD.values():
current += v
res = max(res, current)
return res