编程语言
首页 > 编程语言> > 剑指Offer(Python版本)

剑指Offer(Python版本)

作者:互联网

面试题03. 数组中重复的数字

# 法一
# 使用Counter统计,找到重复即可
from collections import Counter class Solution: def findRepeatNumber(self, nums: List[int]) -> int: c = Counter(nums) return c.most_common()[0][0]

 

标签:shu,nums,Offer,Python,zhong,Counter,int,版本,重复
来源: https://www.cnblogs.com/cassielcode/p/12469290.html