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 :/
Clever
Chuch Norris style.
best
Cheekiest method I have ever seen!
This comment is hidden because it contains spoiler information about the solution