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.
Indeed!
Same problem here! If I run the same test elsewhere, it returns the correct output...
From a "code golf" perspective, this indeed is a good solution. Anyway, though I like codewars very much, I find it frustrating how top-voted solutions are always the shorter solution. I rarely see on top readable solutions or optimized solutions. But those two points should be far more critical for a professional coder than the length of the code.