Problem
There are n flights labelled 1 to n. Each booking [first, last, seats] reserves seats seats on every flight from first to last, inclusive. Return a list answer of length n where answer[i] is the total seats reserved on flight i + 1.
Example 1
bookings = [[1, 2, 10], [2, 3, 20], [2, 5, 25]], n = 5
Example 2
→ [10, 55, 45, 25, 25]
Example 3
bookings = [[1, 2, 10], [2, 2, 15]], n = 2
Example 4
→ [10, 25]
Constraints
1 <= n <= 2 * 10^41 <= bookings.length <= 2 * 10^41 <= first <= last <= n1 <= seats <= 10^4