__________________________________________________________________________________________________
class Solution {
    public int[] corpFlightBookings(int[][] bookings, int n) {
        int[] a = new int[n+1];
        for(int[] b : bookings){
            a[b[0]-1] += b[2];
            a[b[1]] -= b[2];
        }
        for(int i = 0;i < n;i++){
            a[i+1] += a[i];
        }
        return Arrays.copyOf(a, n);
    }
}	
__________________________________________________________________________________________________

__________________________________________________________________________________________________
