AlgoMaster Logo

Segment Tree

arr=[1, 3, 5, 7, 9, 11],queryL=1,queryR=4,updateIdx=2,updateVal=10
0 / 52
arr1031527394115
algomaster.io
Step:Start: Build a Segment Tree from array [1, 3, 5, 7, 9, 11], then query sum of range [1, 4] and update index 2 to 10.