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.
We can't, as I said, there is (and there was, I didn't add it) a fixed test where the unique is the first one, so... You said your code passed 15 of 16 tests, your code failed that one, it's very simple. It's an edge test case to filter wrong solutions like yours. Fix your code so it can find the unique number even if it is the first one.
About statistics:
89% of 4,775 (4,775 / 13,625 - could have given a rating in total). <- This means that from 4,775 persons who cared about voting (in all languages), 89% voted satisfied.
13,625 of 39,367 (less than 50% completed the task) <- No, this means that from a total completions in all languages of 39,367, 13,625 are from javascript. This isn't exactly true because a single warrior can complete the kata in more than one language and it doesn't count as +1 to total completions but it does count in language completion.
Total Times Completed 39372 / Warriors Trained 68536 is roughly 57%.
Unproven
P.S.: I see you've passed the kata but your code is still wrong, and it'll fail with inputs like this
[2,1,1,1,1]
. Check in Solutions how it is properly solved.... :/
btw:
Yes I did, and it works. When I see someone reports an issue, the first thing I do is testing the code to see if there is indeed an issue or not. I added a little code to make sure in random tests the numbers were different, but the chance that'd happen was near to 0 to begin with. And the code you posted was failing for another reason, as I already pointed out.
There is a specific test where the unique number is the first one, why did you assume otherwise?
well, looks like it is... ;) You made the assumption that the unique number would never be at first position, but that's not part of the specifications.
Dmitrys2, with that code you wrote, you'll fail tests with inputs like this:
[1, 0, 0, 0]
. The kata is ok.There are more than 13k solutions in javascript.
It has a 89% satisfaction rating, does that seem low to you?
Hi,
not an issue, a question. Long story short: read what's in there to find out what you did wrong. ;) (and apparently, you didn't get what the actual task really is... Not sure, since I don't really get your explainations. But What I'm sure about: the kata isn't broken, hence "not an issue, a question")
cheers
EDIT: make sure it doesn't happen because you're mutating the input (you didn't tell about the language you use so I cannot check)
EDIT²: if ever this is the mutation of the input problem, raise another issue specifically about that (language+problem), thx