size cells, all starting at zero. You are given a list of changes changes, where changes[i] = [a, b, delta] means: add delta (possibly negative) to every cell with an index from a to b inclusive.
Apply all the changes and return the resulting array.size=4, changes=[[0, 1, 5], [1, 3, -2]] → [5, 3, -2, -2]
The first change adds 5 to positions 0–1: [5, 5, 0, 0]. The second subtracts 2 from positions 1–3: [5, 3, -2, -2].
size=3, changes=[] → [0, 0, 0]
No changes, so every cell stays at zero.
size ≤ 10⁵changes.length ≤ 10⁴a ≤ b < sizedelta ≤ 1000size=4, changes=[[0, 1, 5], [1, 3, -2]]
[5, 3, -2, -2]
Run checks the first 3 tests in your browser. Submit checks all 105 tests on the server, hidden ones included.