Data structures · Flashcard

When would you pick a quadtree over a fixed geohash grid?

medium

Answer

When density is very uneven. A quadtree splits a cell only when it holds too many points, so a city centre gets tiny cells and a desert stays one big cell, and each lookup scans a similar number of points. A geohash grid is simpler and works as a plain database key, but its cells are the same size everywhere.

Review this in your daily deck All cards in Data structures