标签:nbsp tco http col self lse lis return interval
题目描述:
方法一:排序O(Nlogn)
class Solution: def removeCoveredIntervals(self, intervals: List[List[int]]) -> int: intervals.sort(key = lambda x:(x[0],-x[1])) res,rmax = len(intervals),intervals[0][1] for i in range(1,len(intervals)): if i > 0 and intervals[i][1] <= rmax: res -= 1 else: rmax = intervals[i][1] return res
标签:nbsp tco http col self lse lis return interval
原文地址:https://www.cnblogs.com/oldby/p/12084275.html