Ad
  • Default User Avatar

    It makes every sense if there is not any restriction on an empty list of people (a "huge" empty list of people, though :).

    Some of the programs posted just break if you feed an empty list (for example, timakz11 and hainihao's ones). That's plain wrong.

    Now, another issue is which should be the correct answer on such a situation (empty lists): "YES" or "NO".

    Most people who have posted a solution think that the solution is "YES". You yourself think that way.

    Some few return "NO" when the empty list is there (technout and kill-that-Hohhot-man to name just two).

    I'd say that the "technically" right result (that is the "YES" answer) is the correct one. At least this is what most people think.

  • Default User Avatar

    I review that, and i think that will help.
    Thanks for your help and cooperation.

  • Custom User Avatar

    The third test case makes no sense. Technically, the result is "YES" as he doesn't get into a situation where he can't give the correct change. On the other hand, the answer is "NO" because there're no customers to sell tickets to...

  • Default User Avatar

    The test suite is incomplete. It needs at least the followning:

    test.assert_equals(tickets([100, 25, 25, 25]), "NO")
    test.assert_equals(tickets([50, 25, 25], "NO")
    test.assert_equals(tickets([], "YES")

    This is because any list of buyers that begins with a 100$ bill or a 50$ bill must return "NO" whatever the rest of the list is (since at the beginning the till is empty and Vasya can't return any change. Also, if the list of buyers is empty, Vasya is OK (he doesn't fail to give the returns)... though I guess that the cinema's owner won't.

    Some solutions posted and acepted as right are actually wrong because of this (ie. Wangsihe, Hickock). Specially all the solutions that merely count the number of bills received of each class or solutions that don't take into account empty lists of people.

  • Custom User Avatar

    Ok, I've added a test case to the description where the lack of bills of a kind is explained. Hope it helps.

  • Default User Avatar

    Thanks for your kind reply.
    The test is OK, the task description was little bit cryptic for me.
    I was able to solve this kata.
    The only thing that can do with it, is improve somehow it explanation.
    Perhaps to describe the bills are not splittable.
    If you could do that, i think that was helpful for those who are new to this kata.

  • Custom User Avatar

    The author hasn't logged in for more than 2 years, and I'm not a native english speaker either.
    If you think explaining why that test should return false will help, I could add it to the description later. You're welcome.

  • Default User Avatar

    I am not a native english speaker (and others).
    Therefore, sometimes it is hard to me (and others) to precisely understand what is the task.
    As i wrote, i recognize later the nature of the bills, but it took time to get that.
    This is the reason why i complained.
    I don't have better description (read my first sentence), but i have my opinion.
    And i have hope, if me (and others) will be enough, the creator will think over, what could he/she improve.
    Thanks for your patience/help. (especially to dramforever)

  • Custom User Avatar

    If you have a better description propose it (just complaining won't help), as it is, it's very clear to me (and others), and not so much for you (and others). Bills aren't magic things that change their value or you can split them, I think that's pretty obvious.

  • Custom User Avatar

    The money can only be in bills, and bills cannot be split. The second 100 client cannot be satisfied because you cannot give her 75 change when you only have one 100 bill and 2 25 bills.

  • Default User Avatar

    In the line there is 5 bill with 25. Total is 125.
    So think, first client is OK.
    Why did you write the clerk can't give the change?
    I missed something?
    I thought it over again.
    So, i should know that the bills remain with their worth, although it wasn't mentioned.
    OK, now i understood the task. But i don't understand how could be so such weak the kata description...

  • Custom User Avatar

    First client with a bill of 100, receives 3 bills of 25 (Vasya has only 2 bills of 25 left), so Vasya can't give the change to the other one. Not a kata issue. Nobody forces you to solve a kata, you can always skip it or forfeit.

  • Default User Avatar

    This test11 is still broken.
    I don't know why is it marked as solved.
    Input = [25, 25, 25, 25, 25, 100, 100]
    After processing the first 100's bill, the cassa/dispenser/clerk has 75 local foobar.
    When the second 100 is coming, there is enough change to process this transaction.
    Now, i will skip this kata, but i am looking forward for any notification about the issue solving.
    I think such weakly explained katas with their bad testcases just steal my time, when could work with proper task or could just simply rest.
    How can i report this issue?

  • Default User Avatar