Determine Circle Intersection Status for Rendering Order
Company: Point72
Role: Data Scientist
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Overview: This question evaluates geometric reasoning and computational-geometry competency, including spatial relationship analysis and handling numerical edge cases relevant to pairwise object interaction.
Constraints
- 1 <= len(pairs) <= 200000
- Coordinates and radii are integers: -1e9 <= x, y <= 1e9, 0 <= r <= 1e9
- Use integer arithmetic (compare squared distances) to avoid floating-point error
- Output list length must equal input list length
Hints
- Compare squared center distance d2 with (r1+r2)^2 and (|r1−r2|)^2.
- If d2 > (r1+r2)^2 or d2 < (|r1−r2|)^2, circles are SEPARATE.
- If d2 equals one of those squared values, circles TOUCH.
- If centers and radii are identical, treat as INTERSECT.