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.
Clever
love the readbility but this isnt the best way
Clever.
So, this is not the best practice even though it has 68 best practices. This mean I should not just beleive this counter, I think.
I have just joined codewars and want to understand it.
Yes, and while doing this it builds three potentially unnecessary intermediate strings.
Tell me please, does this solution iterate over formData four times?
While it was fun to figure out the one-liner, this is far more readable
Yo!
You are using integer literals which is implicity converted to double values. There is possible implementation default effect. I suggest to use double literals (0.0, 400.0).
For example, see https://en.cppreference.com/w/cpp/language/implicit_conversion (Floating–integral conversions)
If you want to compare these 2 printing methods, do it yourself - removing
<< "\n"
from"Hello cout" << "\n"
reduces the number of assembly commands from 10 to 4, just 1 more than withprintf
, andputs
is in face just 2 assembly commands - 1 less thanprintf
.This is not the most efficient option.
This is the most efficient solution.
better use stringbuffer or stringdtreamer