AlgoMaster Logo

Range Sum Query 2D - Immutable

matrix=[[3,0,1,4,2],[5,6,3,2,1],[1,2,0,1,5],[4,1,0,1,7],[1,0,3,0,5]],row1=2,col1=1,row2=4,col2=3
0 / 11
algomaster.io
Step:Start: add up every cell inside the query rectangle