NeetCode #329LC-287MediumLinked ListNC 150NC 250
← Back to All Problems

#329 · #287 · Find the Duplicate Number(寻找重复数)

📌 Problem Statement & Constraints

Given an array nums of n + 1 integers where each value is in [1, n], exactly one value is repeated (possibly more than twice). Find it without modifying the array and using O(1) extra space. Constraints: 1 <= n <= 10^5, 1 <= nums[i] <= n.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!