2 Comments
User's avatar
Sahil Sarwar's avatar

The analogy of a 2D binary search is great.

I wonder like if we are given 3 coordinates, like maybe for a 3D space, then we can probably extend this analogy to 3D, or nD binary search. And probably create like a general nD data structure for it.

Just wondering.

Expand full comment
Pratik Pandey's avatar

For 3D space, there are other data structure like OctTrees.

I don't think it's easy to have an nD data structure, which guarantees the same level of performance!

Expand full comment