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.
Codewars really needs experts to rank solutions.
Handling negative numbers may have been unnecessary, but I did feel strongly that the sub-problem should not be condensed into a one-liner like many solutions here did.
-OP
This solution is clever and very fast, but it doesn't feel like best practices. Such a complex solution deserves a comment with a full explanation. Also, the definition clearly mentions recursion, probably because the entire point is for students at this level to get more comfortable with recursive solutions.