Mental Model
A prefix sum array stores the sum of all elements from the start up to each position. It helps quickly find sums of any part of the original 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, just subtract the totals.
Original array: [1] -> [2] -> [3] -> [4] -> [5] Prefix sums: [1] -> [3] -> [6] -> [10] -> [15]
