AlgoMaster Logo

Segment Tree with Lazy Propagation

arr=[1, 6, 8, 10, 12, 11],updateL=1,updateR=4,updateVal=3,queryL=2,queryR=5
0 / 41
algomaster.io
Step:Start: Build a segment tree from array [1, 3, 5, 7, 9, 11], then perform range update and range query with lazy propagation.