摘要: class Solution: def majorityElement(self, nums): c = [] for i in set(nums): c.append(nums.count(int(i))) return list(set(nums))[c.index(max(c))] 阅读全文
posted @ 2020-03-13 21:25 HackerEarl 阅读(85) 评论(0) 推荐(0) 编辑