Concept Flow - Prefix Sum Array
Start with original array
Create prefix sum array of same size
Set prefix[0
For each index i from 1 to end
Calculate prefix[i
Prefix sum array ready for queries
Build a new array where each element is the sum of all elements up to that index in the original array.
