Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Segment Tree with Lazy Propagation
Bookmark
Input
Standard
Small
Full Range Query
Update All
Custom
arr
=
[1, 9, 11, 13, 15, 11]
,
updateL
=
1
,
updateR
=
4
,
updateVal
=
3
,
queryL
=
2
,
queryR
=
5
1
0
6
1
8
2
10
3
12
4
11
5
algo
master
.
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.
0 / 41
Input
Standard
Small
Full Range Query
Update All
Custom
arr
=
[1, 9, 11, 13, 15, 11]
,
updateL
=
1
,
updateR
=
4
,
updateVal
=
3
,
queryL
=
2
,
queryR
=
5
0 / 41
1
0
6
1
8
2
10
3
12
4
11
5
algo
master
.
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.