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.
I've got the advice to never move in a return statement from Scott Meyer's 'Effective Modern C++'
It is a local variable since you are copy-constructing it.
This comment is hidden because it contains spoiler information about the solution
Okay, added some words to the descriptions to clarify that.
We're not doing integer division here. You can only do
4/2
, not3/2
.Your solution fails the tests from time to time.
If you started with an efficient algo, they work the same; the point is that sloppy solutions won't work here.