Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The problem states that the array has every integer from 1 to n exactly once except for some integer in between, which appears twice. The array that you're testing on doesn't fit this description (it has a 9 but no 6, for example), so the solution doesn't work.
I tried this with: arr = [1, 5, 7, 3, 2, 9, 2, 8]
And it returned 9 instead of 2 :/
Double is used for slicing not indexing
Didn't know you can put if statements like that. Nice!
wow!
i did test multiples times it was always finish faster although its neglible , thanks for knowledge
Clever
Nice solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Just make a research with the names of the methods you don't know and you should find all the informations about it.
Someone can explain me this please? ^^
blowing my mind*
It's a solution of a programmer knowing his language.
12 Best practices and 18 Clever votes
don't you think this is a typewriter operator, not a programmer, solution?
Loading more items...