Geometry Basics Checkpoint

Reason through segment degeneracy, event ties, crossing closest pairs, and integer bounds.


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

1. For A=(1,2), B=(5,2), C=(3,-1), what is orient(A,B,C)? Enter the signed integer.
2. All four orientation values for two closed segments are zero. What additional check decides whether they intersect?

Select one answer.

3. What is the maximum overlap of inclusive intervals [2,4], [4,4], [4,6], [7,8]? Enter one integer.
4. An integer sweep uses +1 at start and -1 at end+1. For [1,2] and [3,4], both events occur at 3. Which handling avoids a false peak?

Select one answer.

5. A closest-pair split is [(-3,0),(-1,4)] and [(1,4),(6,0)]. What is the minimum squared distance over all four entries? Enter one integer.
6. A recursive closest-pair call returns its points sorted by y. What should the parent do with the two returned orders to keep the combine step linear?

Select one answer.

7. The current squared distance bound is d2=25. A later strip point has squared vertical separation 25. Can it strictly improve the current answer?

Select one answer.

8. Two allowed entries are (-10^9,-10^9) and (10^9,10^9). Which initialization safely permits the minimum squared distance to be found?

Select one answer.

Join Discord