7 kyu
Find The Duplicated Number in a Consecutive Unsorted List
1,878 of 9,555jdwolford
Description:
You are given an array of n+1
integers 1
through n
. In addition there is a single duplicate integer.
The array is unsorted.
An example valid array would be [3, 2, 5, 1, 3, 4]
. It has the integers 1
through 5
and 3
is duplicated. [1, 2, 4, 5, 5]
would not be valid as it is missing 3
.
You should return the duplicate value as a single integer.
Arrays
Algorithms
Similar Kata:
Stats:
Created | Jun 26, 2015 |
Published | Jun 26, 2015 |
Warriors Trained | 11435 |
Total Skips | 139 |
Total Code Submissions | 21087 |
Total Times Completed | 9555 |
JavaScript Completions | 7026 |
Ruby Completions | 377 |
Python Completions | 1878 |
C# Completions | 345 |
R Completions | 99 |
CoffeeScript Completions | 8 |
Scala Completions | 16 |
Total Stars | 58 |
% of votes with a positive feedback rating | 92% of 977 |
Total "Very Satisfied" Votes | 844 |
Total "Somewhat Satisfied" Votes | 115 |
Total "Not Satisfied" Votes | 18 |