Skip to content
Snippets Groups Projects
Commit 2f1bc8de authored by Martin Mareš's avatar Martin Mareš
Browse files

Geometric: Which -> with

parent fb122d64
No related branches found
No related tags found
No related merge requests found
......@@ -229,7 +229,7 @@ We can build the 2-d tree recursively. First we create two lists of points:
one sorted by the $x$~coordinate, one by~$y$. Then we construct the $x$-tree.
We find the point with median~$x$ coordinate in constant time. This point
becomes the root of the $x$-tree. We recursively construct the left subtree
from points which less than median $x$~coordinate --- we can construct the
from points with less than median $x$~coordinate --- we can construct the
corresponding sub-lists of both the $x$ and~$y$ list in $\O(n)$ time. We
construct the right subtree similarly. Finally, we build the $y$-tree
for the root: it contains all the points and we can build it from the $y$-sorted
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment