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'd argue the algorithms in the functions you've listed are pretty obvious (they're all wrappers over a single loop), and that knowing how to use these tools together is more important, but I guess that's just subjective
Wrong. By using the libraries of your respective language, you are:
This is really bad advice to give to beginners. The only time I can see this advice as being sensible is if none of the tools in the library offer suitable abstractions for the problem and you're then putting a circle in a square hole.
Because it's already there at the end of it.
But it is not correct? The example shows that expected answer is not
[3, 2, 1, 7, 9, 8, 6, 4, 5]
, but something else?There is this example in description:
What does your solution return locally for the above input?
Codewars is the machine
What makes you think that your code works on your machine? It seems to miss an essential piece, it seems it would (almost) never return a valid answer. Does it work for you locally for the arrays from the example? Does it return the same answer as the example shows?