Skip to content

Commit 9e76b3b

Browse files
committed
spelling
1 parent 0b231a6 commit 9e76b3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data_structures/segment_tree.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ This leads to a construction time of $O(n \log^2 n)$ (in general merging two red
602602
The $\text{query}$ function is also almost equivalent, only now the $\text{lower_bound}$ function of the $\text{multiset}$ function should be called instead ($\text{std::lower_bound}$ only works in $O(\log n)$ time if used with random-access iterators).
603603
604604
Finally the modification request.
605-
To process it, we must go down the tree, and modify all $\text{multiset}$ from the corresponding segments that contain the effected element.
605+
To process it, we must go down the tree, and modify all $\text{multiset}$ from the corresponding segments that contain the affected element.
606606
We simply delete the old value of this element (but only one occurrence), and insert the new value.
607607
608608
```cpp
@@ -682,7 +682,7 @@ other Segment Trees (somewhat discussed in [Generalization to higher dimensions]
682682

683683
### Range updates (Lazy Propagation)
684684

685-
All problems in the above sections discussed modification queries that only effected a single element of the array each.
685+
All problems in the above sections discussed modification queries that only affected a single element of the array each.
686686
However the Segment Tree allows applying modification queries to an entire segment of contiguous elements, and perform the query in the same time $O(\log n)$.
687687

688688
#### Addition on segments

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy