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.
Can someone please explain me this piece of code? what is id?
That's true, but there is no better way to do it, short of resorting to a higher-precision floating-point type.
You forgot for double inprecision, basicly floating-point arithmetic, not a good idea.
This comment is hidden because it contains spoiler information about the solution
in test example 3.14 and 42 are equal to 45.14, this is clear, but i wonder where did 0.001 come from?
Awesome Kata! C++ tuples are insane to work with! Can you suggest me more Katas similar to yours?
This comment is hidden because it contains spoiler information about the solution
https://www.codewars.com/kata/reviews/5883785e512b0330ff0003c9/groups/64f00dae18408b0001497ac8
https://www.codewars.com/kata/reviews/58847cf4a3dd74693e000114/groups/64f00d7318408b0001497abf
Clever (4,7s) but not best practice.... Sorry....(my code = 3,9s, but not clever :-( )
Solution of O(nlogn) complexity for O(n) problem, though
it is pass-by-value since the & was removed. So the input parameters are in fact copies. The code is fuly eqivalent to the function taking const& and then making explicit copies.
I don't think changing the function signature is a good idea. Parameters are modified inside the function
and a user will get a trash instead of original strings.
Maybe parameters were const on purpose...
This comment is hidden because it contains spoiler information about the solution
Impressive.
Loading more items...