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.
Kata is not well-defined for
decimal
values in the exclusive range (-0.005m
,0m
), such as0.001m.ToCurrency("$")
. Half the answers retain the negative sign and the others do not.No random tests
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/190.
Please join the discussion to help us identify duplicate kata and retire them.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Please note in description, that before final "big tests" stock should be always "reseted". Because with your constructor one time, it subtract and solver can riddle why - and that IMO should not be part of kata.
No random tests.
Counting the result for the entire table as one value is not secure, when it's something between 30 and 50. Even just returning a fixed value gets the result right after some submits.
Your kata can be reduced to this one with a trivial join, so that's a duplicate.
This comment is hidden because it contains spoiler information about the solution
Log:
java.lang.IllegalArgumentException
at Factorial.factorial(Factorial.java:6)
at Factorial.factorial(Factorial.java:13)
at FactorialTests.test_factorial0(FactorialTests.java:24)
I got this error from the test cases. I don't understand the error. Any help is appreciated.
This comment is hidden because it contains spoiler information about the solution
in the default test cases you expect "f(x) = 1x" as the answer, but in the submission tests '1x' is always converted to 'x' unless its '- 1x'. To fix simply change the first default test case to expect "f(x) = x" so that the same solution can pass the submission tests and the default tests.
This is an excellent kata. Thanks for making it