Segment Tree/ Lazy Propagation Updates

Revision en1, by FluffyPotato, 2019-07-04 00:38:16

Hello all

Typically lazy propagation and segment tree updates come in the form "increase range l-r by diff". What if you want to update a segment tree like "update range l-r to val". So instead of a difference, you tell it precisely what number to update to.

How would you do this? Is there an article somewhere about this?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English FluffyPotato 2019-07-04 00:38:16 368 Initial revision (published)