k-d Tree Construction Complexity
First sort the points in each dimension.
- O(dn log n) time and dn storage.
- These are stored in A[1..d,1..n]
Finding the widest spread and equally divide into two subsets can be done in O(dn) time.
Constructing the k-d tree can be done in O(dn log n) and dn storage