数组力扣复习
56. 合并区间 - 力扣(LeetCode)
class Solution:def merge(self, intervals: list[list[int]]) -> list[list[int]]:intervals.sort(keylambda it: it[0])res[]for start,end in intervals:if res and start<res[-1][1]:res[-1][1]max(res[-1][1]…
2026/10/19 12:08:11 阅读全文 →