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.
woohoo
This comment is hidden because it contains spoiler information about the solution
short and clever code!
Yeah but then it wouldn't be a 1 line solution. 👀 Can't be having a best practice solution on Codewars that's more than 1 line long!
This comment is hidden because it contains spoiler information about the solution
And about n times less memory.
Feels like using map makes it faster
Excellent solution.
I used map instead of for, any advantage?
Yes. And AGAIN, spoiler flag, please...
This comment is hidden because it contains spoiler information about the solution
Why is it slower?
spoiler flag, please... (comments visible in the dashboard!)
This comment is hidden because it contains spoiler information about the solution