Google Asked me this
- Posted
- 5 Nov 2026
Summary
I was asked a geometry query problem about finding all points within a given circle, proposed a square‑enclosure solution, and was ultimately rejected.
How it went
There are millions of points spreading in x-y plane.there is a function f(x,y). There is a radius given to us. We needed to find all the points within that circle. There will be different queries made to f(x,y). We needed to find it in most optimal manner. I was able to get all the points square enclosing that circle. Still they rejected me.
Questions asked (1)
- 01
Find Points Within a Circle Query
Data Structures & Algorithms
Given millions of points on an x‑y plane and a function f(x, y), you are provided a radius. For each query to f(x, y), you must return all points that lie inside the circle defined by the radius in the most optimal manner possible.