There is a line for the self-checkout machines at the supermarket. Your challenge is to write a function that calculates the total amount of time r...
For further actions, you may consider blocking this person and/or reporting abuse
Kotlin semi-functional solution:
This is a cool puzzle! Without going into spoilers, last year's Advent of Code had a similar puzzle, but with a few layers of complication on-top.
As an additional challenge, I added a record of the order shoppers finish.
Rust solution. This is easy when you use the right data structure - in this case, a heap.
Ruby solution: It's not the prettiest, but it works. I'm a Ruby newb so this was some good practice and I won't say no to any pointers or suggestions if I am doing something that's not very "Rubyish" (What word do they use for poorly used Ruby? In Python they say "that's not very "pythonic").