Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e76b3b

Browse files
committed
spelling
1 parent0b231a6 commit9e76b3b

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 theeffected element.
605+
To process it, we must go down the tree, and modify all $\text{multiset}$ from the corresponding segments that contain theaffected 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 onlyeffected a single element of the array each.
685+
All problems in the above sections discussed modification queries that onlyaffected 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)

[8]ページ先頭

©2009-2025 Movatter.jp