Use a quad-tree for 2D
http://en.wikipedia.org/wiki/Quadtree
More Related Contents:
- Determine if two rectangles overlap each other?
- How to find number of words in a phrase with spaces removed by checking v. dictionary
- What is the most effective way for float and double comparison?
- How to implement classic sorting algorithms in modern C++?
- Fast bignum square computation
- Detecting endianness programmatically in a C++ program
- Finding holes in 2d point sets?
- Algorithm to convert RGB to HSV and HSV to RGB in range 0-255 for both
- What is the efficient way to count set bits at a position or lower?
- Fast exact bigint factorial
- Generating combinations in c++
- How to find which elements are in the bag, using Knapsack Algorithm [and not only the bag’s value]?
- Lock-free Progress Guarantees in a circular buffer queue
- Increasing accuracy of solution of transcendental equation
- Finding duplicates in O(n) time and O(1) space
- Fast String Hashing Algorithm with low collision rates with 32 bit integer [closed]
- Emulate “double” using 2 “float”s
- Need for predictable random generator
- Determining if a number is prime
- Are there any better methods to do permutation of string?
- Iterative DFS vs Recursive DFS and different elements order
- How to find largest triangle in convex hull aside from brute force search
- Converting epoch time to “real” date/time
- Searching in a sorted and rotated array
- What is the safe way to fill multidimensional array using std::fill?
- Cut set of a graph, Boost Graph Library
- Is it more efficient to copy a vector by reserving and copying, or by creating and swapping? [duplicate]
- Why there is no std::copy_if algorithm?
- priority queue with limited space: looking for a good algorithm
- How can I test whether a number is a power of 2?