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.
TypeScript translation (basically the existing accepted JavaScript translation with type notations added)
Fix for Typescript
Fix for Java
Hopefully the merge conflict is fixed now, as I cannot get codewars to display to me what the conflict is, and I don't see it.
I may be stupid :P
Thanks for catching that oversight.
For ease of working in an IDE, the entirety of the preloaded section should be in a single codeblock at the end of the description or as a comment in the solution setup.
The primary perf constraint is the size of the base and exponent, not in how many different bases and exponents are tested.
1000 random tests is already an order of magnitude more than all other languages (including C).
Additionally the range of inputs for base, exponent and modulus is 0 to 2^63, which also exceeds other languages by orders of magnitude.
Since I assume Java isn't the most performant language on CW, even the reduced 1000 random tests should still be enough of a perf requirement.
Apparently the translation refused to be published because the number of test results was too large.
10000 random tests. All completed in time, but the test output log silently hit some transfer limit, causing the server to reject publishing.
As such the amount of random tests was reduced to 1000.
Rather than
@Test
use@RepeatedTest(x)
where x is the number of times the test should be repeated.E.g.
@RepeatedTest(100)
to run the test 100 times.(Made a fork with that implemented)
quotes added. (
fmt
can only be a string)fixed
fixed
done
Quotes added.
Loading more items...