To add to all elements from index to , you only need to modify two positions in the difference array: That's it.
Two operations, regardless of how big the range is. Why does this work?
When you later compute the prefix sum of , adding at position propagates forward to all later positions. Subtracting at cancels it for positions after .