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.
This comment is hidden because it contains spoiler information about the solution
Fixed.
.
Done. Note that one can run the code offline to get the necessary answer without time limit, but I expect any naive attempt will take literally forever. (Maybe not, in which case I'll just take down the kata.)
Should be fixed now.
Fixed C++ sample tests.
Java version had tests written incorrectly, which led to weaker tests than specified. Should be fixed now.
This comment is hidden because it contains spoiler information about the solution
Rust: The following 2 unnecessary warnings appear in the main test:
I don't see any such issue. The
persistence
function there has the correct type signature (at least now).This comment is hidden because it contains spoiler information about the solution
Rust: The sample tests and main tests give warnings about unnecessary parentheses.
This comment is hidden because it contains spoiler information about the solution
Rust: Can you remove the extraneous parens in the sample test and the main test (which are giving some unnecessary warnings)? Same for the sample tests in this kata.
Yeah, FP is wacky, and I don't think we can reliably minimize the loss of precision in all cases or we should enforce the solvers to do the same. Not having to round the results (and using approximate equality tests as you suggested) would be the best, but "if the value before rounding is sufficiently close to a half integer, let both results pass" should work too. (You showed that using the same f64 can still lead to different results, based on the order of operation.)
Loading more items...