Ad
  • Custom User Avatar

    Yes. Due to a way how testing loop is built, you print many inputs in one line.

    Print an additional blank line at the very beginning and/or end of your solution function to get better overwiew of inputs.

  • Custom User Avatar

    @hobovsky I'm obtaing the test cases with a simlple for loop inside the function just to see what the lines that are failing my tests look like so I can debug it in a local environment to make sure my code does not commit any mistakes.

    for (auto i: peopleInLine)
    std::cout << i << ' ';

    Are you aware if this type of code (the for with the cout) has any issues printing the test cases?

  • Custom User Avatar

    Good kata for beginner, easy to understand & the instruction very clear

  • Custom User Avatar

    @sachin19988: all the cases you showed should expect "YES". Why do you think ot shold be otherwise?

    @Draelios: you are right that such test case should expect "NO". I also checked the C++ version of the kata and it seems to be correct. I suppose you misinterpret some information, and the numbers you are looking at are not an actual input. Are you sure these are not, for example, multiple inputs of more than one test case, displayed in a confusing way?

    Please see if this article is any helpful: https://docs.codewars.com/training/troubleshooting

  • Default User Avatar

    i think i have same problem [25, 50, 25, 100], [25, 25, 25, 25, 50, 100, 50],[25, 50, 25, 100, 25, 25, 50, 100, 25, 50, 25, 100, 25, 25, 50, 100]
    all this lists excepting "yes" instead of "no"

  • 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++.

  • Custom 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