标签:etc remove nbsp app 自己 int 提交 image solution
题目描述:
自己的提交:
class Solution: def removeInterval(self, intervals: List[List[int]], toBeRemoved: List[int]) -> List[List[int]]: res = [] for i in intervals: if i[0] >= toBeRemoved[1] or i[1] <= toBeRemoved[0]: res.append(i) else: if i[0] < toBeRemoved[0]: res.append([i[0],toBeRemoved[0]]) if i[1] > toBeRemoved[1]: res.append([toBeRemoved[1],i[1]]) return res
标签:etc remove nbsp app 自己 int 提交 image solution
原文地址:https://www.cnblogs.com/oldby/p/11969870.html