Intervals — Reasoning Check

Apply the module invariants, traces, and boundary conditions.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. After merging closed intervals [[1,4],[2,3],[6,7],[7,9]], how many intervals remain? Enter one integer.
2. During merging, current=[1,8] and next=[3,4]. Which update preserves the active union?

Select one answer.

3. For scheduling intervals [[1,2],[2,4],[1,4],[4,5]], where touching endpoints are compatible, what is the minimum removal count? Enter one integer.
4. You need the fewest arrows to hit closed balloon intervals [[1,5],[2,3],[4,6]]. Why is choosing the earliest-ending balloon's end 3 safe?

Select one answer.

5. How many output intervals result from intersecting A=[[0,2],[5,7]] with B=[[1,5],[6,8]]? Enter one integer.
6. The current intersection candidates are A[i]=[1,4] and B[j]=[2,6], with both input lists sorted and internally disjoint. Which advance is justified after recording [2,4]?

Select one answer.

Join Discord