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.
arguably, but it's subjective at that point. the parenthesis would help quantify what's being spread, but the author has already put these line by line, so...
"more code" isn't a big deal if it's not increasing complexity. sure he could have perhaps used ternaries instead of if-else, but what i see at work here is the prevailing desirability of standard syntax.
failed to stipulate desired outcome for input of empty array, but it's easy enough to write an edge case or two to figure it out.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution