Ad
  • Default User Avatar

    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.

  • Default User Avatar

    Rust code does not take into account that Balzer starts from the last element.

    Modifying initial tests squad[0] = TRIGGER_STATE; to squad[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.

  • Default User Avatar

    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.

  • Default User Avatar

    I think the longest mountain pass in your example is [1,2,3,4,6,6] so the answer should be (6,2), because 5=(2-1)+(3-2)+(4-3)+(6-4)+(6-6). No?

  • Custom User Avatar

    Good catch. Fixed.

  • Default User Avatar

    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.

  • Default User Avatar

    Rust tests expect power_sum_dig_term whereas the sample function has uppercase characters.

  • Custom User Avatar

    Please use spoiler flag next time. Your post was visible in the homepage discourse.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Default User Avatar

    Would it be possible for someone to fix Rust?

  • Default User Avatar

    To be clear, there is an unwrap here: 0 inside fold is the default value. Same you could write as .max().unwrap_or(0) , which is also correct error handling. .unwrap() is what you should never use...

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    When attempting to pass Rust the error message says that my code returned an empty array. When I insert the same input into initial tests the code runs fine and returns data. There is something wrong with final tests.

  • Default User Avatar

    It's a really interesting kata, but according to people who did this task this kata is too difficult for kata 6. I think this kata sould be kata 5 and it would be cool if this task had tags for searching, such as "trees" and "recursion"

  • Loading more items...