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 definitely prefer readability, lol. I remember when I was starting out and hooked on code golf.
This comment is hidden because it contains spoiler information about the solution
man using number as the map function instead of writing a function out is hella smart
or u can save the calculations
Because sometimes we want to convert from one type to another.
This comment is hidden because it contains spoiler information about the solution
"Input will always be a non-negative integer."
Not good when we got negative numners
breakChocolate(-81, -1)
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
Brilliantly!
If there were no rules on the input, then that's probably a good idea. However, the description of the kata clearly states that the input will always be a non-begative integer, so the extra defensive code is unnecessary in this situation.
This comment is hidden because it contains spoiler information about the solution
If n or m is 0 you don't even need the multiplication
Loading more items...