leetcode/0287.Find-the-Duplicate-Number/README.md
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one.
Example 1:
Input: [1,3,4,2,2]
Output: 2
Example 2:
Input: [3,1,3,4,2]
Output: 3
Note:
给出 n + 1 个数,这些数是在 1-n 中取值的,同一个数字可以出现多次。要求找出这些数中重复的数字。时间复杂度最好低于 O(n^2),空间复杂度为 O(1)。