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.
Still, spoiler tag required
This comment is hidden because it contains spoiler information about the solution
Depends on the content, but if not marked as spoiler, they're visible in the homepage discourse for people that hasn't solved the kata yet.
I'm new here so maybe I'm getting it wrong, but isn't a comment of an answer usually a spoiler? I don't suppose the site intends for us to comment lame stuff like "nice answer!" since there's buttons for that.
to be honest, it's brilliant, but my brain is too weak for that. fabulous
The description should disclose number of tests: 30 tests up to 1000 soldiers each. This would allow to deduct that any
HashMap
solution will likely not pass.Rust code does not take into account that Balzer starts from the last element.
Modifying initial tests
squad[0] = TRIGGER_STATE;
tosquad[size-1] = TRIGGER_STATE;
does not help, because the final tests have it hard-coded as well.The same problem may exist in other translations.
The final tests contain 50 tests with ~1k elements and 10 tests with ~20m elements. Make sure you can pass all within the timeframe of your language.
I think the longest mountain pass in your example is
[1,2,3,4,6,6]
so the answer should be(6,2)
, because5=(2-1)+(3-2)+(4-3)+(6-4)+(6-6)
. No?Good catch. Fixed.
Incorrect assert message in Rust:
assert!(actual == expected, "Expected score with dice {dice:?} to be {actual}, but was {expected}\n");
Actual should be swapped with expected.
Rust tests expect
power_sum_dig_term
whereas the sample function has uppercase characters.Please use spoiler flag next time. Your post was visible in the homepage discourse.
This comment is hidden because it contains spoiler information about the solution
I was able to pass the Attempt test suite in Rust without any issues. Please post your current solution, mark it as a spoiler and specify the input(s) causing your solution to fail so we may reproduce your issue and determine whether it is indeed a problem with the tests.
Closing the issue since there's insufficient evidence it's related to the Kata itself.
Loading more items...