Skip to main content

🟢 剑指 Offer 03. 数组中重复的数字

LeetCode 提示

题目难度 简单

原题链接 🔗 leetcode

题解 1.py#

class Solution:  def findRepeatNumber(self, nums: List[int]) -> int:    d = {}    for n in nums:      if n in d:        return n      d[n] = 1