← Questions

Count clusters of 2D points within a radius

0
GoogleCodingLast asked Jul 2026

A coding interview question asked in Google's first round (coding), last asked Jul 2026. It tests union-find, geometry and graphs.

Two points belong to the same cluster when they are within distance r of each other, and clusters chain: if A is close to B and B is close to C, all three share a cluster even if A and C are far apart. Given the points and r, count the…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Google · First round: coding · Last asked Jul 202645 min · Coding in a Google Doc, no syntax highlighting or autocomplete · No AI

What it tests

union-find · geometry · graphs

Your code and the AI tutor open when you unlock this question.