Find area with most points in a 2D plot

57 Views Asked by At

Assume I have got a set of points; their locations are scattered around a 2D plane. Like:

p0 = x0, y0
p1 = x1, y1
p2 = x2, y2
...
pn = xn, yn

We will be given a box of size p*q, and we will have to find a region where the number of points is maximized.

Any particular way to solve this problem? I'm trying to get steps, not an actual solution. Thanks.

Similarly, how to do this for a 3D dataset?