New problem: you have an array, and you need to add a value to all elements from index to . You'll do this many times, then read the final array.
Naive approach: loop from to , add to each element. Each update takes time. Can you do better? Yes. Difference arrays let you perform range updates in .