摘要: 1 class Solution: 2 def __init__(self): 3 self.l = [] 4 5 def preOrder(self,node,temp): 6 if node != None: 7 temp.append(str(node.val)) 8 if node.left 阅读全文
posted @ 2020-03-01 13:59 Sempron2800+ 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def rankTeams(self, votes: 'List[str]') -> str: 3 dic = {} 4 n = len(votes) 5 m = len(votes[0]) 6 mat = [[0 for _ in range(26)] fo 阅读全文
posted @ 2020-03-01 13:56 Sempron2800+ 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]: 3 sorted_nums = sorted(nums) 4 n = len(nums) 5 index = 0 6 dic 阅读全文
posted @ 2020-03-01 13:54 Sempron2800+ 阅读(175) 评论(0) 推荐(0) 编辑