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.
You guys was so fast that dont even delete the comment, epic
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
?This solution is incorrect for tree with root = -1 and only one leaf = -2: it will return -1 instead of -3.
Thank you! I'm very pleased :))
This comment is hidden because it contains spoiler information about the solution
Using a primes cache accelerates the iteration.
Well .. Nice .. Very nice Code ...
O(logn)
is the ideal Complexity for this Problem .. The Code is Short yet Effective ..Bravo
and BTW ...if it's not personal or vulgar to quest.. you have Impressive Skills in C++ , and Good Understanding To the Effecient Algorithms (i.e) why Don't Post/add Katas ?? ... Regards ..Zizou