Bird
Raised Fist0

Given the final free time intervals [[5,6],[7,9]] from the sweep line algorithm, which of the following could be the original employee schedules?

hard🔄 Reverse Engineer Q9 of Q15
Intervals - Employee Free Time
Given the final free time intervals [[5,6],[7,9]] from the sweep line algorithm, which of the following could be the original employee schedules?
A[[[1,5],[6,7]], [[2,4],[8,10]]]
B[[[0,5]], [[6,7],[8,9]]]
C[[[1,3],[6,7]], [[2,4]], [[2,5],[9,12]]]
D[[[1,2],[3,5]], [[5,6],[7,8]]]
Step-by-Step Solution
Solution:
  1. Step 1: Analyze free intervals [5,6] and [7,9] imply busy intervals cover [1,5], [6,7], [2,5], and [9,12]

    Busy intervals must cover all times except these free gaps.
  2. Step 2: Check which schedule matches these busy intervals

    [[[1,3],[6,7]], [[2,4]], [[2,5],[9,12]]] matches the busy intervals that produce free times [5,6] and [7,9] exactly.
  3. Final Answer:

    Option C -> Option C
  4. Quick Check:

    Only [[[1,3],[6,7]], [[2,4]], [[2,5],[9,12]]]'s intervals produce the given free time [OK]
Quick Trick: Free intervals complement merged busy intervals [OK]
Common Mistakes:
MISTAKES
  • Choosing schedules that don't cover the free intervals correctly
Trap Explanation:
PITFALL
  • Candidates confuse free intervals with busy intervals or pick schedules missing coverage.
Interviewer Note:
CONTEXT
  • Tests deep understanding of interval merging and free time derivation.
Master "Employee Free Time" in Intervals

3 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Intervals Quizzes