8 Grids
In this chapter, we look at what happens as we consider multidimensional values and targets. The data structures we’ve examined so far have all shared a common constraint—they organize data based on a single value. Many real-world problems involve multiple important dimensions, and we need to extend our data structures to handle searches over such data.
This chapter starts by introducing nearest-neighbor search, which will serve as our motivating use case for multidimensional data. As we will see, the generality of nearest-neighbor search makes it very flexible and applicable to a wide range of spatial and non-spatial problems. It ...
Get Data Structures the Fun Way now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.