Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 171 Bytes

File metadata and controls

3 lines (2 loc) · 171 Bytes

Define sum[i] as the sum from index=0 to index=i, you can find the sum between index=i to index=j using sum[j] - sum[i - 1].

Take care of the boundary value !