Katkat

Determine Circle Intersection Status for Rendering Order

Point72Data Scientist · Technical Screen

Last updated

This question evaluates geometric reasoning and computational-geometry competency, including spatial relationship analysis and handling numerical edge cases relevant to pairwise object interaction.

Scenario

Graphics engine must evaluate multiple pairs of circles to decide rendering order based on intersection.

Question

Given an array where each element contains two circles defined as (x1, y1, r1, x2, y2, r 2), return for every pair whether they intersect, touch, or are separate.

Hints

Compute center distance d; compare d with r1+r2 and |r1−r2|.