Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit b1e5224

Browse files
committed
1109 1864 ms, faster than 34.18%
1 parent 67e2118 commit b1e5224

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
package problem1109
22

33
func corpFlightBookings(bookings [][]int, n int) []int {
4+
res := make([]int, n)
5+
for _, b := range bookings {
6+
i, j, k := b[0], b[1], b[2]
7+
for m := i - 1; m < j; m++ {
8+
res[m] += k
9+
}
10+
}
411

5-
return nil
12+
return res
613
}

0 commit comments

Comments
 (0)