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.
It would be better if you post using Markdown formatting, to preserve indendation:
https://github.com/Codewars/codewars.com/wiki/Markdown-Formatting#block-code-formatting
You should be able to print the input that is causing your code to fail. That would be helpful.
This comment is hidden because it contains spoiler information about the solution
No problem, and instead of using global vars, try refactoring using default values.
The last line of the function, where you call the function again with different parameters should be returned too, so the result comes back when recursion ends.
Don't use global vars, they keep their values between tests. You've fixed that inside your function, so that's not the real problem here (but still, that's a bad practice). The problem is you're doing recursion wrong, you should return the function call too.
Post your code using markdown formatting here and mark your post as having spoiler content.
Is your code printing or returning the result?
It's another list that differs of the original in one value. You shouldn't change the original list/array (this is in red in the instructions).
No, the tests are ok, it's your code that's mutating the input. Please read the previous posts where it's been already explained.