Imagine lots of points like of order 10M.
Now I randomly draw a circle in a given space.
This circle will now enclose some points depending on the center and radius.
Now, I want to select all the points which are present inside this circle.
The brute force approach is very inefficient.
Is there a better way to solve this.
P.S- I am coding in python.
Thanks
Edit: Brute Force Approach:
Select a point from the space , calculate the distance from the center and if it is less than the radius, then it lies inside otherwise outside.
The brute force is, well I have to go thru all the points and this is problametic because in the next iteration I am going to again select a point in random and repeat above steps.So this is like O(n^2).. Can I do better?