Ad
  • Default User Avatar

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

  • Default User Avatar

    well if you import the whole library like this solution your program gets a little bit slow and when your working on a large project libraries are the most efficient way.

  • Custom User Avatar

    Thanks benjaminzwhite, your explination helped me.

  • Default User Avatar

    Ah, yes, I hadn't accounted for there already been somebody at the till. Cheers

  • Default User Avatar

    Draw a picture - look up "Gantt chart" or "scheduling diagram" - represent time horizontally and create a row for register machine #1 and create a row for register machine #2.

    Now, when 1st person arrives, let's say they go to (available) machine #1. Draw a horizontal bar of time = 2 units in row for machine #1.

    When 2nd person arrives, they go to the only available machine, which is #2. Draw a horizontal bar of time = 3 units in row for machine #2.

    When 3rd person arrives, both register machines are occupied, so they wait until any machine becomes available. This in our case will be machine #1, since 1st person will finish in 2 minutes, while 2nd person will finish in 3 minutes. So draw a horizontal bar of time = 10 units, representing 3rd person, in row for machine #1.

    Now look at your drawing and see how long the longest horizontal line is.

  • Default User Avatar

    Can this be explained please?

  • Default User Avatar

    Bro I missed that too:-)

  • Custom User Avatar

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

  • Custom User Avatar

    This range goes from "minus 3" to "plus 1" so "-3-1" in the sample solution is correct!

  • Custom User Avatar

    No.