Mental Model
A prefix sum array stores the sum of all elements up to each position, so you can quickly find the sum of any part of the original array.
Analogy: Imagine a row of buckets where each bucket holds the total amount of water collected from the first bucket up to that bucket. To find how much water is between two buckets, you just subtract the amounts in the buckets.
Original array: [2] -> [4] -> [6] -> [8] -> null Prefix sums: [2] -> [6] -> [12] -> [20] -> null
