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'd guess that the reason is you can't get much faster than just int
*
with a manually written algorithm for multiplication. The base conversion into binary (internal representation ofint
) was the slow part for add. Maybe should test it out.Because the kata was originally about writing algorithms which manually multiply very large numbers. In Python, numbers can get as big as you want, so solving this would be as simple as
Which is neither interesting, nor worthy of a 4kyu rank.
This kata doesn't make sense for languages with native
BigInt
support (even though there's translations for languages that do supportBigInt
, in the future, I think they will be removed).Fixed C++ sample tests.
Actually, I agree...
Fixed
That should return nil, null, None or Nothing
Sorry: I don't see such a case (C++ ?).
Simple: we switch to Java or C#.
Switch to Java or C#
Question resolved.
One can't know. If not requested explicitly, it could come into scope by some indirect includes, or in some other way, and it's difficult to find out what it actually is and where from.
Since one cannot tell what exactly it is, it's difficult to tell what it actually does.
See both of above.
Unfortunately, not.
Botom line is, when you want to use
std::unique
(or any other name, for that matter), you need to explicitly include headers which provide its declaration. If you attempt to use it but you do not include it, it's an error on your side and strange things may happen.Maybe you didn't get something well: in Codewars, for each kata there are basic tests, and attempt tests. Basic test are very easy ones, passing them is not a guarantee to have actually really solved the kata. In many cases it is not. Solving a kata means your code is able to pass tests generally much harder and much complete than the basic ones, with edge cases and sometimes performance requirements. Maybe you should read this: https://docs.codewars.com/training/troubleshooting/
small correction to your issue.
The test cases already have it.
On the other hand, sample tests dont. So if someone wants to edit that in, go for it.
My bad, I've messed up my tabs and checked another kata... You're (both) right.
I am not sure how you verified the report, but c++ translation seems to be a mess. it has wrong includes, missing includes, and tests indeed rely on the fact that solution introduces required names.
it needs to be raised as an issue and fixed.
Loading more items...