Cons | Search complexity (big-O) | |
---|---|---|
Sorted array + bsearch | Only works for 1D | logn + s |
Quadtree | Height can be jank depending on point distribution | nh |
k-d tree | May have infinite height depending on construction | s + sqrt(n) |
Range tree | Wasteful in space (space-time tradeoff) | logn + s |