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.
you are mutating the input array, while the tests re-used the same arrays for several tests. I fixed the issue, but in general it's considered bad practice to mutate your arguments for no good reasons; and on Codewars it might confuse the tests suite for some old katas