Ad
  • Default User Avatar

    Logic of counting time is false. Total waiting time has to be the last customers waiting time, but not the sum of all. Because waiting time of previous customers is already counted in the last customers waiting time/
    So, [4, 3, 2] has to be 13 (4+2 + 3+2 + 2), but not ((4) + (4+2 +3) + (4+2 + 3+2 + 2))

  • Custom User Avatar

    you must return the minimum time needed for all of the customers to wait for their coffee, so the sum of all the waiting times.

    "The minimum time needed for all of the customers to wait" is equivalent to max(subqueue_1_time, subqueue_2_time, ..., subqueue_n_time), while "the sum of all the waiting times" is equivalent to subqueue_1_time + subqueue_2_time + ... + subqueue_n_time. This statement doesn't make any sense.

  • Custom User Avatar

    Probably applies to many translations, though I specifically encountered it in the Lambda Calculus translation:

    • Zero-time drinks are sometimes generated by the random tests, which is neither directly implied by the description nor checked in the example or fixed tests. This can make a difference to some solutions which might assume zero is a starting base case (which it isn't, necessarily).
    • IMHO failing random test cases should print the failing input array/list in the message, to help users debug their implementation. I didn't understand why my first attempt failed until I guessed that perhaps some drink lists might contain zero-time drinks. Seeing the input array for random tests would have made that immediately clear.

    Zero-time drinks should be explicitly (dis)allowed and/or included in the example tests and/or shown in the failing test message.

    Otherwise, a fun kata, thanks.