Mental Model
A prefix sum array stores the sum of all elements up to each position, so you can quickly find sums of parts of the array.
Analogy: Imagine a row of buckets where each bucket holds the total water collected from the first bucket up to that bucket. To find water between any two buckets, you just subtract the amounts in those buckets.
Original array: [2, 4, 6, 8] Prefix sum: [2, 6, 12, 20] Index: 0 1 2 3
