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 learn a lot standard library from solution
i dont know it how to work
One line Code,Nice !
No it won't. Negative numbers will always evaluate to a true boolean, even with std::negate.
Not really. This is equivalent to accepting a const-reference and then copying it in the function body. The const-reference is an addition by the translator who translated this Kata into C++ -- it isn't inherent to the exercise itself (which was originally written in a language without the notion of a const reference parameter).
it modifies v, but v isn't reference, so caller won't know.
Nice and clean code, but wouldnt it modifies V?
This comment is hidden because it contains spoiler information about the solution