We have a list of integers, where:
- The integers are in the range 1..n1..n
- The list has a length of n+1n+1
Our list has at least one integer which appears at least twice. It may have several duplicates and each duplicate may appear more than twice.
Write a function which finds any integer that appears more than once in our list.
The solution must be optimized for space