Determine Circle Intersection Status for Rendering Order
Point72Data Scientist · Technical ScreenLast 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|.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.