Ad
  • Custom User Avatar

    Please add random tests.

  • Default User Avatar

    Thank you for the responce @akar-0.

    I did manage that.
    As always I am suprised of other's solutions :smile: ...

    A good kata.

  • Custom User Avatar

    It's hard to answer without spoiling the solution. 1/4 is the initial value, it's in C0 ([0,1]). For C1 the value you must control is no more 1/4, it changes on each iteration.

  • Default User Avatar

    But looking at example where's here 1/4 ?

    C1 = [0; 1/3], [2/3; 1]

    PS: I probably missing something .... :(

    PS2: Seems like I'm starting to get the idea

  • Custom User Avatar
  • Default User Avatar

    Hi there, interesting kata (not yet passed :()

    Just got a failed test '_4_denominator_not_a_power_of_3' in C translation

    num = 1
    den = 4
    n   = 1
     
    Submitted: false
    Expected:  true
    

    Is this correct?

  • Custom User Avatar

    Haha. Thanks for the suggestion :-)

  • Default User Avatar

    I gotta say, you make fun kata! Thanks! I'm thinking there should be a murder/mystery sequel about Mr. Pong's unexpected disappearance after Mrs. Pong comes home and discovers all her precious porcelain in pieces on the floor!

  • Custom User Avatar

    @zhiburt, Yeah sorry...

    Translations of my Kata must be same as original (or as much as is possible for the language) else I won't approve them. So that means same kind of Random Test code too.

  • Custom User Avatar

    Not speaking for Dinglemouse but speaking for the quality assurance team at Codewars: this should not be approved then.

    Learn how to do random tests. Have a look at how Rust kata you have solved do it ( you can ), and steal from there what has already been invented. Copy the actual logic from the kata.

    Random tests really are essential to have.

  • Default User Avatar

    Hi great kata (especially the description :))

    I've created a Rust translation but it doesn't contain random tests.
    https://www.codewars.com/kumite/61fe5d0f31469b48c9e8261b?sel=61fe5d0f31469b48c9e8261b

  • Default User Avatar

    Hey I also run into such an issue.
    I did reset it didn't help.

    I am confident to say that it's not an issue in my code.

    Also I can state that the issue is not determenistic.
    For example I've got an error on such data [][]int{{165, 526}, {510, 397}}.
    I created my own test with it and it works.

    BTW: thanks for a great kata

  • Custom User Avatar
  • Default User Avatar

    Fun Kata, took a couple of hours to complete. Encoding was pretty straight forward, but came up with a hacky solution for decoding, but eventually passed all tests.

  • Default User Avatar

    Thank you for a great kata @darrentburgess.

    I've eventually coped with it. (Not sure if it's a decent solution, but it works :))

    And I would like to notice that in rust basic tests there's two tiny syntax errors
    cannot find function `encodeRailFenceCipher` in this scope .
    The fix is to rename the function.

  • Loading more items...