AlgoMaster Logo

Range Sum Query - Mutable

nums=[1, 3, 5, 7, 9, 11],operations=[{"type":"update","index":2,"val":10},{"type":"sumRange","left":1,"right":4}]
0 / 29
algomaster.io
Step:Fenwick tree: each cell stores a partial sum.