3 ms·
The length is n+1 and contains all ints 1 through n, so there can only be a single duplicate.
by jhot 4y ago
The length is n+1 and contains all ints 1 through n, so there can only be a single duplicate.
- williamkuszmaul 4y agoBut does the question ever say "all"...?