Prefix sum

Prefix sum — cumulative array & range queries

Step 1 / 10
You will answer many queries “what is the sum of nums[L..R] inclusive?” on the same static array. What is the standard preprocessing trick?