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.
At least javascript:
[a,b]
wherea
>b
(descritpion explicitly says that256
->[[8,2],...]
is valid).In Python, the submission tests go up to 1000 while the description only states that inputs go to 500.
Depending on the tests in the other languages, either the description should be updated or the Python tests should be changed to match the description.
Lua translation!
python new test framework
I found the instructions very confusing.
I'd simplify it by saying that a good char is in the same column or row of buttons as the previous char.
I've got a Rust solution which failed the "num" crate check, since I used the div_floor function from there. Thought only num::BigInt was disallowed. No matter, I removed the dependency, and it still failed the crate check, so I removed all dependencies (itertools) and it still fails the crate check. I reset the environment with the button at the bottom, still fails. I don't know what to do now. Any ideas? I'm guessing the crate is still installed somewhere so the test is failing.
python new test framework is required. updated in this fork
In the PHP version, the random tests will occasionally pop up an empty string instead of a number, combined with an error:
Stacktrace that is supplied with the code goes to the tests, not to the kata-code:
My code handles empty strings as zero, but the tests still fail, as an exception is thrown.
This comment is hidden because it contains spoiler information about the solution
In PHP:
No sample tests
AssertSame
should be usedUsage of class and method is redundant and should be removed
Decimal numbers are used in the kata, which means floats are not the correct data type for this. The returned result should definitely be a string (or a big decimal, but in JS this is complicated).
Rust translation ready for your approval: https://www.codewars.com/kumite/64469a35b8feca00195e995d?sel=64469a35b8feca00195e995d
This comment is hidden because it contains spoiler information about the solution
Adding all kinds of edge cases and different types of input, should be part of the sample tests aswell. This makes the kata less annoying.
Update to JS
Node 14.x
: https://www.codewars.com/kumite/639be9febde94df169ba37cd?sel=639be9febde94df169ba37cdLoading more items...