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?
Yeah, my first solution for rad was along those lines. I struggled for a bit to understand what part of the code was causing the stack to blow, I was actually surprised it was there. I ended up using (ew) for loops.
Do you know why that happens?