Find Duplicate in Array
Given an array nums containing n + 1 integers each in [1, n], there is exactly one duplicate number. Find it without modifying the array and using only constant extra space.
Given an array nums containing n + 1 integers each in [1, n], there is exactly one duplicate number. Find it without modifying the array and using only constant extra space.