Ad
  • Custom User Avatar
  • Custom User Avatar

    Read Clarifications part of the description to know how the clients go to the tills.

  • Default User Avatar

    Totally agree. The kata doesn't say that the fastest customers check out first.

  • Custom User Avatar

    [...] it works perfectly in my editor.

    That doesn't make your solution correct. It's very likely that you're using biased and limited inputs, which give faulty solutions (like yours) the appearance that they are correct.

    What my function returns and what is expected are exactly the same.

    That is false:

    Z-Pp-Ggg-Llll-Nnnnn-Rrrrrr-Xxxxxxx-Qqqqqqqq-Eeeeeeeee-Nnnnn-Uuuuuuuuuuu      // actual
    Z-Pp-Ggg-Llll-Nnnnn-Rrrrrr-Xxxxxxx-Qqqqqqqq-Eeeeeeeee-Nnnnnnnnnn-Uuuuuuuuuuu // expected
    

    Moreover, sometimes when I submit, it passes 100 tests and fails 1, other times, it fails them all. I don't understand.

    Your solution contains a very common beginner's mistake. I recommend taking a deeper look at the failed test case to figure out what is going wrong.

  • Custom User Avatar

    Your code is not case-insensitive. So it doesn't work there either, you just didn't check it with the same input values.

  • Default User Avatar

    till 1 will serve 2 then 10

    till 2 - 3 then 2

    total time - 12

  • Custom User Avatar

    You're not testing it properly there.

    It should default to English if the language is not in the database, or in the event of an invalid input.

  • Custom User Avatar

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

  • Custom User Avatar

    I tried coming up with some unique ways to call 'hello world!'. Had to settle for the easiest method though :P