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's in the codewars mission statement to help recruiters ascertain talent.
Fixed in JS.
Technically, it is very bad practice to manipulate the original array. Would have been just as easy with a map. And with map, you could just do it all in one step which makes the unnecessary shift even worse.
You can see an example with my solution.
This comment is hidden because it contains spoiler information about the solution
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 allowed contributors if you want to add it yourself to this kata.
Random tests cases are good practice irregardless of cheat detection. They help test the robustness of your code under many types of conditions and ensure quality and correctness of the Kata in addition to keeping Warriors from hard coding solutions. They also allow the author to create unique and interesting data structures. Overall they are good practice for many reasons. That being said it would probably be more helpful if in addition to logging an issue regarding the lack of random tests the Code Warrior were to offer the new author guidance on creating a random testing framework. Sometimes this happens and Warriors jump in and contribute to the Kata test cases assuming you have allowed others to contribute. Thanks for your contributions.
I've added some stuff to the description. Hope that helps. Basically, return a "copy" of the original function.
because you're modifying the object passed in.