Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@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?
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++.
This comment is hidden because it contains spoiler information about the solution