18 lines
891 B
Markdown
18 lines
891 B
Markdown
# Segment Tree
|
|
|
|
This data structure allows you to do point update and range query in $O(\log N)$ time each for any associative operation.
|
|
|
|
* Tutorial
|
|
* CPH 9.3
|
|
* [CSAcademy Tutorial](https://csacademy.com/lesson/segment_trees/)
|
|
* [cp-algorithms](https://cp-algorithms.com/data_structures/segment_tree.html)
|
|
* [Codeforces Tutorial](http://codeforces.com/blog/entry/18051)
|
|
* [Slides from CPC.3](https://github.com/SuprDewd/T-414-AFLV/tree/master/03_data_structures)
|
|
|
|
## Practice Problems
|
|
|
|
* [USACO Springboards](http://www.usaco.org/index.php?page=viewproblem2&cpid=995)
|
|
* can use segment tree with min query in place of the map mentioned in analysis
|
|
* [POI Cards](https://szkopul.edu.pl/problemset/problem/qpsk3ygf8MU7D_1Es0oc_xd8/site/?key=statement) [](81)
|
|
* [Counting Haybales (USACO Plat)](http://www.usaco.org/index.php?page=viewproblem2&cpid=578)
|
|
* Lazy Updates
|