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.
I still don't understand why mutating or not the input would be relevant to this.
My first answer mutate the input, returned the right answer and I was getting “Value is not what was expected”. That's fine, but if I hardcode the return to the right answer it works, and the input is being mutated all the same.
I even console.log a test to see if the result coming from the algorithm and the hardcoded version are the same, and they are, but only the hardcoded version is accepted as correct. Would anyone be bothered to explain why?
This comment is hidden because it contains spoiler information about the solution
Don't mutate the input.
Why is there no report button to report hateful users that can't solve a puzzle nor even stay calm?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I had this problem, but it was apparently because I was modifying the input. If you solve this kata without modifying the input, then you probabaly won't have this problem.
if (answer) return answer;
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution