986. 区间列表的交集https://leetcode-cn.com/problems/interval-list-intersections/
class Solution: def intervalIntersection(self, firstList: List[List[int]], secondList: List[List[int]]) - List[List[int]]: i,j 0,0 ans [] while i len(firstList) and j len(secondList): left max(firstList[i][0],secondList[j][0]) right min(firstList[i][1],secondList[j][1]) if left right: ans.append([left,right]) if firstList[i][1] secondList[j][1]: else: return ans



