Find the Duplicate Number
Cyclic Sort
Problem
Given an array of integers nums
containing n + 1
integers where each integer is in the range [1, n]
inclusive.
There is only one duplicate number in nums
, return this duplicate number.
For example:
Solution
Last updated
Was this helpful?