In this post, let’s explore another data structure to find nearby restaurants on Yelp or Google Maps. A quadtree is a data structure that is commonly used to partition a two-dimensional space by recursively subdividing it into four quadrants (grids) until the contents of the grids meet certain criteria (see the first diagram).
Is it possible to incrementally add/remove business in the quadtree? If not, I guess a background task can build a new quadtree periodically.