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.
Hi,
I didn't get any notification of your first message, sorry...
The specs, seem sparse, but I think they are actually pretty correct here: the only place where renumbering is talked about is in the
unlock
method. So if ever you rearrange something in some other places, you're not following the specs.Does that clarify the matter?
edit: could you still extract a concrete (but rather simple) case where your solution was failing because of that?
No, you didn't have to? What you call
answers
is actually the answer key, and what you callkey
are the student's answers, and you treat them as such. You switched the names, but you did not switch the meanings.Duplicate issue, check redsketch's post below. Closing this one.
In your code you effectively change the input array trips. You can find that out if you do a console.log(trips) just before you return your result. If you don't change the input array, your answer will be accepted.
Cheers.
I can reproduce your error, with the code I get from your post (view solution option). However submitting another solution with a wrong answer (right answer + 1) cleanly receives the error:
I am not an expert in JS and I have no clue what goes wrong.
Changed to "No, I am your father". It's been a while since I watched the old trilogy for the last time. Thanks for positive feedback :)
That means javascript sort is not stable in the environment.