From 2f1bc8de8d746f2479456260f779be76f9eab021 Mon Sep 17 00:00:00 2001 From: Martin Mares <mj@ucw.cz> Date: Fri, 21 Feb 2020 18:02:08 +0100 Subject: [PATCH] Geometric: Which -> with --- 07-geom/geom.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/07-geom/geom.tex b/07-geom/geom.tex index 7efda99..1fd6cc3 100644 --- a/07-geom/geom.tex +++ b/07-geom/geom.tex @@ -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 -- GitLab