Ad
  • Custom User Avatar

    Please review: C++ Translation

  • Custom User Avatar

    Nice

  • Custom User Avatar

    LC translation

    this translation modifies the description

  • Custom User Avatar

    Thansk for agreeing that I'm correct! I thought I was going mad. I'm not sure (I'm in training and have a lot to still learn about Ruby). However, I dind't modify any of the inputs for the random tests.

  • Custom User Avatar

    It would seem you are correct.

    Does Ruby allow input modification? The translation seems vulnerable to that. Are you modifying your inputs?

    ( I don't know Ruby, so I'm poking in the dark a bit. )

  • Custom User Avatar

    I am attempting this kata in Ruby and passed all the test cases. However, in the random tests, if the input array has 3 + 0s in it I am failing.

    When I check the expected compared to my solution, the expected seems to have always deleted the 3rd & 4th 0 of the input array, but surely it should only be deleting the 4th as that's the second 0 in the pair. Surely only every other occourance should be deleted? I can see people have passed the test on Ruby so am I just missing something here? Some examples below:

    Examples:
    [5, 4, 3, 7, 4, 3, 2, 9, 2, 9, 7, 1, 2, 8, 0, 0, 3, 2, 7, 4, 5, 4, 9, 0, 4, 0, 5, 2, 5, 5, 4, 0, 2, 3, 5, 4, 6, 2, 5, 4, 9] input
    [5, 4, 3, 7, 4, 3, 2, 9, 2, 9, 7, 1, 2, 8, 0, 3, 2, 7, 4, 5, 4, 9, 4, 5, 2, 5, 5, 4, 0, 2, 3, 5, 4, 6, 2, 5, 4, 9] expected
    [5, 4, 3, 7, 4, 3, 2, 9, 2, 9, 7, 1, 2, 8, 0, 3, 2, 7, 4, 5, 4, 9, 0, 4, 5, 2, 5, 5, 4, 0, 2, 3, 5, 4, 6, 2, 5, 4, 9] my result

    [6, 3, 9, 2, 9, 0, 7, 7, 5, 4, 9, 1, 7, 6, 4, 5, 0, 6, 0, 9, 6, 6, 3, 9, 0, 2, 4, 5, 7, 3, 8, 1, 2, 9, 4, 7, 4, 0, 0, 6, 5, 4, 4, 4, 4, 2, 7, 8, 6, 1] input
    [6, 3, 9, 2, 9, 0, 7, 7, 5, 4, 9, 1, 7, 6, 4, 5, 6, 9, 6, 6, 3, 9, 2, 4, 5, 7, 3, 8, 1, 2, 9, 4, 7, 4, 0, 6, 5, 4, 4, 4, 4, 2, 7, 8, 6, 1] expected
    [6, 3, 9, 2, 9, 0, 7, 7, 5, 4, 9, 1, 7, 6, 4, 5, 6, 0, 9, 6, 6, 3, 9, 2, 4, 5, 7, 3, 8, 1, 2, 9, 4, 7, 4, 0, 6, 5, 4, 4, 4, 4, 2, 7, 8, 6, 1] my result

    [1, 4, 7, 5, 6, 0, 8, 1, 0, 6, 6, 5, 2, 2, 6, 2, 7, 4, 7, 0, 2, 3, 8, 4, 0, 9, 8] input
    [1, 4, 7, 5, 6, 0, 8, 1, 6, 6, 5, 2, 2, 6, 2, 7, 4, 7, 2, 3, 8, 4, 9, 8] expected
    [1, 4, 7, 5, 6, 0, 8, 1, 6, 6, 5, 2, 2, 6, 2, 7, 4, 7, 0, 2, 3, 8, 4, 9, 8] my result

    Thanks

  • Default User Avatar

    Thanks!

  • Default User Avatar

    approved

  • Custom User Avatar

    .

  • Custom User Avatar

    not anymore. => assert.deepEqual

  • Default User Avatar

    C Translation kumited (author inactive).

  • Custom User Avatar

    approved

  • Custom User Avatar

    approved

  • Custom User Avatar

    COBOL translation (author inactive).

  • Custom User Avatar
  • Loading more items...