# Find the Duplicate Number (Leetcode 287)

Problem Link: <https://leetcode.com/problems/find-the-duplicate-number/>

```python
class Solution:
    def findDuplicate(self, nums: List[int]) -> int:
        
        n=len(nums)
        for i in range(n):
            nums[nums[i]%n]+=n
        for i in range(n):
            if(nums[i]//n>1):
                return i
```
