🟢 剑指 Offer 03. 数组中重复的数字
LeetCode 提示
题目难度 简单
原题链接 🔗 leetcode
#
题解 1.pyclass Solution: def findRepeatNumber(self, nums: List[int]) -> int: d = {} for n in nums: if n in d: return n d[n] = 1
题目难度 简单
原题链接 🔗 leetcode
class Solution: def findRepeatNumber(self, nums: List[int]) -> int: d = {} for n in nums: if n in d: return n d[n] = 1