Segment Tree: Range update with lazy propagation
When moving from a normal segment tree to a lazy segment tree, the main goal is to support efficient range updates. In a standard segment tree, updating a range [l, r] requires visiting every affected leaf node, which is O(n) in the worst case. Lazy ...
abhinandanmishra1.hashnode.dev4 min read