Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Hi guys! So I'm having trouble with the following test:

    { 25, 25, 50, 50, 25, 25, 25, 25, 50, 100, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ,25, 25, 25, 25, 50, 100, 50, 25, 25, 50, 100 }

    I've marked the post as a question, hesitating if it an issue or probaly a my missundestanding of the problem. So the test is expecting a "YES" for this test case but, and here is my question, I don't understant why it is expecting this result. So from the 10th position of the array there are 11 "50"s in a row, and you run out of "25"s bills to give back. You have only received 6 so far in the queue and already gave back some for previous customer.

    Another similar test that expects a "YES", starts with a 50 which would be automatically a "NO" since we don't have any bills yet go give back.
    (50 25 50 25 25 25 50 25 100 25 50 50 25 25 50 25 25 50 25 100 50 25 50 25 100 25 25 50 50 25 25 )

    Any help will be aprecciated. Language is C++.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

    "Should return false for {25, 25, 100}"

    I don't quite get this, because the clerk would've had 50 by the time it reached the 3rd person in line. If the clerk sold a ticket to that person, the clerk would've had enough of change at 75 which is needed by the customer.

    I used this logic because it applied to other test cases, or the other cases would've failed.

  • Custom User Avatar

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

  • Custom User Avatar

    Haskell: random tests do not respect the input constraints.

  • Default User Avatar

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

  • Custom User Avatar

    Ruby 3.0 should be enabled, see this to learn how to do it

  • Default User Avatar

    I just finished solving this in C# and I had no troubles with the existing test cases. But I think it is missing at least one test that should have been there.

    [25, 25, 25, 100] should return "Yes" - My currently passing solution would not pass this case, but because such a test isn't in there, my code passes.

  • Custom User Avatar

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

  • Default User Avatar

    "Dubstep" C++ Translation

  • Default User Avatar

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

  • Custom User Avatar

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

  • Loading more items...