Skip to content

Commit 5bdfb5d

Browse files
authored
Update README.markdown
1 parent 10d90da commit 5bdfb5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Segment Tree/LazyPropagation/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ print(stringSegmentTree.query(leftBound: 0, rightBound: 5))
1515

1616
The use of `<T>` is so exciting. But we seldom use the Segment Tree to solve string problem instead of *Suffix Array*. And the Segment Tree is a kind of *Interval Tree* to solve the Interval Problem in mathemtics and statistics, which is a structure for storing intervals, or segments, and allows querying which of the stored segments contain a given point. A segment tree for a set *I* of n intervals uses `O(nlogn)` storage and can be built in `O(nlogn)` time. Segment trees support searching for all the intervals that contain a query point in O(log n+k), k being the number of retrieved intervals or segments.
1717

18-
But that is common Segment Tree. By **Lazy Propagation**, we can implement to modify an interval in `O(nlogn)` time. Let's explore together in following:
18+
But that is common Segment Tree. By **Lazy Propagation**, we can implement to modify an interval in `O(logn)` time. Let's explore together in following:
1919

2020
## `PushUp` - update to the top
2121

0 commit comments

Comments
 (0)