Рет қаралды 27,078
In this video, I talk about segment trees, lazy propagation, and discuss a hard segment tree problem at the end. Segment trees are a very important technique to understand in competitive programming because they can be used for lots of cool tricks on arrays and trees.
If you have any questions, please ask them here: codeforces.com/blog/entry/79284
(If you just DM me, other people won't be able to see the answers)
This is a bit easier of an episode than usual because the next two episodes will be hard segment tree topics and that way people can go watch this if they aren't comfortable with normal segment trees.
Here is Matt Fontaine's episode on Segment Trees that I mentioned in this video: • Episode 4 - Segment Trees
Timestamps:
0:00 Good Morning
1:10 Segment Tree Intro
4:35 Range Queries
12:40 Point Updates
14:30 Code example
24:00 Range Updates
29:15 Lazy Prop Alternatives
31:03 Lazy Prop Common Mistakes
35:18 Sneetches (Hard Problem Example)