标签:tar efi print elf for on() __init__ lis init
# Definition for an interval.
# class Interval(object):
# def __init__(self, s=0, e=0):
# self.start = s
# self.end = e
class Solution(object):
def intervalIntersection(self, A, B):
"""
:type A: List[Interval]
:type B: List[Interval]
:rtype: List[Interval]
"""
lengthA=len(A)
lengthB=len(B)
resultA={}
resultB={}
for i in range(0,lengthA):
start=A[i][0]
end=A[i][1]
resultA.update({start:(i,0)})
resultA.update({end: (i,1)})
for i in range(0,lengthB):
start=B[i][0]
end=B[i][1]
resultB.update({start:(i,0)})
resultB.update({end: (i,1)})
print resultA,resultB
for i in resultA.keys():
for j in resultB.keys():
print Solution().intervalIntersection( [[0,2],[5,10],[13,23],[24,25]],[[1,5],[8,12],[15,24],[25,26]])
标签:tar efi print elf for on() __init__ lis init
原文地址:https://www.cnblogs.com/slqt/p/10349963.html