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.
"competitive programming" approach :))
now I think better be just link to some wiki article, instead of tedious manual copy-paste -)
first misunderstood task, second - forget to simplify solution ^.^
Commenting code which does magic now considered a bad practice? By who?
If it's math magic, it is still magic.
Names trick does not help here at all, btw.
Yes, indeed. Do not write comments where code is clean.
But...
How can clean code in this example explain anything? Why you should believe this code is right?
Another people said so?
To make people who read you solution to understand it.
Not a best solution with a good explanation in real world worth much more, than ideal solution
with no explanation.
Supporting projects with lack of comments is always a pain. Try it once to feel it.
"Best Practices" would be to explain solution in comment.