LECTURE 13 OF 25
Prefix Sums
Once you know the running total up to every point, the sum of ANY range is just one subtraction away — no matter how long the range is.
Builds on
Best read after 2. Arrays, 10. Hash Tables and Sets — you can still read ahead, but some of this may lean on ideas covered there.