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
in most cases it is one line statment , != 0 is redundant
I'd suggest keeping a notebook next to you while you code so you can write down all the helpful functions / methods / etc. that you come across
Don't. The code should be not only as concice as possible, it should be readable and obvious. Your solution is better.
But this is probably more readable, it's not always a good idea to remove all the non strictly necessary code. In any case it is a defendable choice to be more explicit.
Don't wait for people to tell you. Just read the documentation and test by yourself (you can click on
fork
to make trials).Please use spoiler flag next time.