Ad
  • Custom User Avatar

    This one was pretty good to review how to deal with boundary issue. Great job!

  • Custom User Avatar

    This was a nice exercise for C#. It allows one to explore a bit more arrays, which I seldom use.

    I did run into the problem with the precision point issue in the random tests. I kept submitting until it worked, as it was suggested by in the comments.

    Shouldn't there be a way in the test to reduce the expected precision in the answer?

  • Custom User Avatar

    So I ran into this weird behavior. For some reason the test was reporting expected as actual and vice versa. This made it difficult to see what the problem was. I kept matching the answer to the string that said what was expected, but it kept failing.

  • Custom User Avatar

    I am seeing the same problem.

  • Default User Avatar

    Thank you for your gracious response :)

  • Default User Avatar

    There may be an issue with the ruby grader.

    The instructions say that the numbers will be unique. I am seeing repeating numbers in the random array tests.

    This was one of the random arrays that it generated
    [-3, 0, -9, -1, -8, -4, 3, 6, -2, 0]

    No big deal. I sorted it and used .uniq() on it.

    Yet it failed in the random tests because it expected 6, yet my code gets 7.

    Hand sorted and taking away the redundant zero, this array lines up like
    [-9,-8,-4,-3,-2,-1,0,3,6]

    So
    We need 3 digits from -8 to -4, -7, -6, -5.
    We need 2 digits from 0 to 3, 1, 2
    We need 2 digits from 3 to 6, 4, 5

    That seems to be 7 digits.

    Yet I can be wrong. It would be that I am not considering a scenario.