Prefix Sum
A running total is stored at each index, so the sum of any range is one subtraction.
A running total is stored at each index, so the sum of any range is one subtraction.
Last updated on September 24, 2026
Was this page helpful?
Thanks for your feedback!