42/42
Part 8 of 8 · Follow-upsCheck yourself
Check yourself
6 questions
  1. 1.Two half-open intervals are (s1, e1) and (s2, e2), start in and end out, each with its start before its end. Which test is true exactly when they overlap?

  2. 2.Free time walks busy blocks in start order, (12, 15), (13, 14), (15, 16), in a day from 12 to 17, but sets free_from = end instead of max(free_from, end). What does it report?

  3. 3.Half-open reservations (1, 4), (4, 7) and (7, 9) go through a sweep that sorts its events so that, at one time, starts come before ends. How many machines does it say are needed?

  4. 4.A rotation runs from day 1 through day 7, closed. Engineer A is free days 1 through 4, and engineer B days 5 through 7. Can A hand off to B?

  5. 5.You want the set of machines with enough GPUs that costs the least, then has the fewest machines. You try sets smallest first with combinations. Can you stop after the first size that has a set that fits?

  6. 6.Shifts are closed day ranges, and you need the fewest that cover days 1 through 14. Which choice, repeated, always gives the fewest?

Now the problem this lesson builds to: 25 Split stays and group staysPractice it