K-dimensional trees or k-d trees organize and represent spatial data. These data structures have several applications, particularly in multi-dimensional key searches like nearest neighbor and range searches. Here is how k-d trees operate:

You can probe one step further and construct a self-balanced k-d tree where each leaf node would have the same distance from the root. Also, you can test it to find whether such balanced trees would prove optimal for a particular kind of application.