Given an array length and a list of range updates (each adding a delta to every element in an inclusive index range), return the final array after applying every update.
Example 1
Explanation: The three updates overlap across several indices; the difference array accumulates all of their boundary effects before one prefix-sum pass reconstructs the final values.
Example 2
Explanation: The range ends exactly at the array's last index, so there is no end + 1 position to subtract at — every element receives the delta.
Example 3
Explanation: Two non-overlapping single-index ranges each affect only their own position, with 0 left untouched in between.
Code execution is coming soon.