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.
If salary depends on amount of written symbols — write this way. An old hindu proverb.
Because this solution is wrong, and won't work without multiple passes.
Not an issue
What your college was teaching you is wrong:
https://cseducators.stackexchange.com/a/4428
Besides, nobody takes these as actual "rules" that has to be followed in practice. The real answer is always "it depends", and caring about petty details like this makes you lose sight of the bigger picture and, hence, always end up with worse things.
that's essentially true when one is spreading the return statements in the middle of somewhat "big" blocks of code. For a so short function, the main drawback is not to have multiple "return"s but the amount of typing that generates!