I am given a huge list of objects with attributes x and y. We are required to search for all objects lying between a given upper and lower bound of both the attributes.
I was wondering if there is an efficient algorithm to implement this.
Thanks!
I am given a huge list of objects with attributes x and y. We are required to search for all objects lying between a given upper and lower bound of both the attributes. I was wondering if there is an efficient algorithm to implement this. Thanks! |
|||
A quadtree or a spatial index (a space-filling curve, for example a hilbert curve). |
|||||
|
There are standard algorithms for this. See http://en.wikipedia.org/wiki/R-tree for one. |
|||
|
homework
, thank you! – ninjagecko Jul 11 '11 at 4:39