2406. Divide Intervals Into Minimum Number of Groups
## 思路
昨天的簡單版
把intervals轉成新的times (left/right+1 ,state)
sort後掃一遍, 記錄重疊intertals個數的最大值
## Code
```python
class Solution:
def minGroups(self, intervals: List[List[int]]) -> int:
times = []
for left, right in intervals:
times.append((left, 1))
times.append((right+1, -1))
times.sort()
res = curr = 0
for _, delta in times:
curr += delta
res = max(res, curr)
return res
```