Lazy Segment Trees

This time we allow for “instructions” to be kept in the nodes that express an operation to be done to all the elements under it. This allows not only queries, but updates to be done in \({\cal O}(\log_2 n)\) time.

Slides