MCPcopy Create free account
hub / github.com/SHY-Corp/LeetCode-Solutions / sumRange

Method sumRange

C++/303.RangeSumQueryImmutable.cpp:35–37  ·  view source on GitHub ↗

So now, the range (i,j) for which we are computing the sum, we will pick the sum till last element, i.e. sum(j+1) and subtract the sum till ith element, i.e. sum[i]. This gives us the sum from whatever range we have picked. */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected