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.
Bro Started The Longest Code Comptition !
hi,
tried it on godbolt,
the resulting assembly-code will be the same,
so there's no real difference.
From my point of view it's just a habit to mark
any cast with the available keywords..
even in katas, it just grew into my muscle memory.
Source of the habit might be this: "https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines" (chapter ES.49) some but not all went in our companies codestyle-guide, so i'm just used to it.
What is the difference between this and
return i
?Its looks very cool
honestly too easy for a 4 kyu.
You are right, I did not mention this point.
The description states that "The numbers are positives" so this would be an invalid input. Actually the Java random tests have an issue as they could produce zeros by a very rare chance.
Well yes but the description states that "The numbers are positives" and
0
is not a positive number.That's why it's disabled. Not a kata issue. See my suggestion below.
This comment is hidden because it contains spoiler information about the solution
Probably test like: "assertEquals("0", Kata.add("0", "0"));" should be added. Some java solutions return empty string with "0"+"0" and pass all the existing tests.
It does not work if a = "0" and b = "0", because sum of "0" and "0" is "0", but this function returns empty String.
This comment is hidden because it contains spoiler information about the solution
Yea true. I was rushing some 7s and 8s so I didn't think of such things :D
This comment is hidden because it contains spoiler information about the solution
Loading more items...