You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/data_structures/segment_tree.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -857,7 +857,7 @@ So we build a 2D Segment Tree: first the Segment Tree using the first coordinate
857
857
858
858
To make the construction process more understandable, you can forget for a while that the matrix is two-dimensional, and only leave the first coordinate.
859
859
We will construct an ordinary one-dimensional Segment Tree using only the first coordinate.
860
-
But instead of storing a number in a segment,be store an entire Segment Tree:
860
+
But instead of storing a number in a segment,we store an entire Segment Tree:
861
861
i.e. at this moment we remember that we also have a second coordinate; but because at this moment the first coordinate is already fixed to some interval $[l \dots r]$, we actually work with such a strip $a[l \dots r, 0 \dots m-1]$ and for it we build a Segment Tree.
862
862
863
863
Here is the implementation of the construction of a 2D Segment Tree.