class Solution {
public int[] corpFlightBookings(int[][] bookings, int n) {
int[] res_array = new int[n];
for(int[] mem : bookings){
for(int j = mem[0]; j <= mem[1]; ++j){
res_array[j - 1] += mem[2];
}
}
return res_array;
}
}
应该会有更优的时间复杂度