摘要: 1 class UndergroundSystem: 2 def __init__(self): 3 self.startStation = collections.defaultdict(lambda: collections.defaultdict(int)) 4 self.endStation 阅读全文
posted @ 2020-03-29 12:44 Sempron2800+ 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def __init__(self): 3 #self.l = [] 4 self.count = 0 5 6 def backTrack(self,rating,temp,idx,inc): 7 if inc == 0:#递减 8 if len(temp) 阅读全文
posted @ 2020-03-29 12:38 Sempron2800+ 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def findLucky(self, arr: List[int]) -> int: 3 dic = dict() 4 n = len(arr) 5 for i in range(n): 6 if arr[i] not in dic: 7 dic[arr[i 阅读全文
posted @ 2020-03-29 12:37 Sempron2800+ 阅读(178) 评论(0) 推荐(0) 编辑