Ad
  • Custom User Avatar

    Approved

  • Custom User Avatar
    • Please add todo!() to the solution setup so it compiles as-is.
    • The anti-cheat code needs updating. Please refer to this kumite for the new implementation of the test function.
    • Random tests: the is no point in creating a distribution if you're going to sample it exactly once (talking about str_size and len). The point of distributions is to create them once and sample many times. So you'd move them out of gen_str function. Frankly, there's no point in having that function, just inline it into the for loop (but leave the distributions outside).
    • Random tests: first you map digts (u32) to String, then you collect, then you join. Why the final join? Simply map to char and collect to String (this saves intermediate allocations).
    • Random tests: Since the point of this kata is to add big numbers, I'd increase the minimum input size to something like 30, instead of 1
  • Custom User Avatar

    Rust translation finished.

    AFAIK, there is no readily available BigInt in Rust.

    Added anti-cheat.

  • Custom User Avatar

    Prolog Translation ready for review.

  • Custom User Avatar

    I tried to replicate test cases 1:1 with the Rust version that I had access to.

  • Custom User Avatar

    I feel as though the description should be updated to note that multiple negations in a row is valid. I based a lot of my logic assuming this was invalid, as it is kind of unusual, to find only on the random tests that it happens.

    If this is not intended, then the Haskell test cases generate invalid tests.

    Regardless, I think it should be mentioned, at least.

  • Custom User Avatar

    This was by far the most interesting kata I have done on this site.

    Thanks

  • Custom User Avatar

    I mean, its semi-ambiguously mentioned:
    The exception is if there is no other rank left to progress towards (Once you reach rank 8 there is no more progression).

    I took that as rank 8 does not have progress, but that should definitely be clearer.

  • Default User Avatar

    I know this is old comment, but for anyone else wondering: https://docs.codewars.com/gamification/ranks/

    Each rank is defined by having a certain score. Each kata is worth a constant score.

    e.g. 8kyu always award 2

    However, reaching 4kyu takes 643 score. So its impractical to level up on easier problems.

  • Default User Avatar

    java.lang.AssertionError: Expected exception: java.lang.Exception

    Its saying that during an assertion, the tests expected an exception from your code but did not recieve one.

    In the prompt it tells you that any rank that isn't -8 through -1 or 1 through 8 should throw an exception

  • Default User Avatar

    Modified.

  • Default User Avatar

    (Rust)
    The description refers to n as the index of the block and m as the volume.
    However, the function provided gives n as the parameter, when it should be m.