prefixsums

noun
UK /ˈpriːfɪks sʌmz/
US /ˈpriːfɪks sʌmz/

Prefix sums are running totals you get by adding numbers one by one.

Using prefix sums, we can quickly find the total of any part of the list.


OTHER MEANINGS

2. In computer science, an array where each element holds the sum of all earlier elements.

The prefix sums array let us answer range-sum queries in constant time.

3. A technique for solving problems by precomputing cumulative values.

She solved the problem with prefix sums to avoid recalculating totals.

4. The sequence of partial totals formed while scanning a list from left to right.

The prefix sums of [1, 2, 3] are [1, 3, 6].