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.
This comment is hidden because it contains spoiler information about the solution
my solution has less lines (which isn't always better) and 1 less array in memory, but you've done the 2 most important things.
1.Correct Results
2.Readable and easy or another developer to understand your code.
This comment is hidden because it contains spoiler information about the solution
Thank you so much!
The performance difference is negligible between the two
Your functions should return in Codewars and next time mark your post as having spoiler content please.