Skip to content

Commit a437e87

Browse files
committed
Runtime: 16 ms (Top 7.49%) | Memory: 101.1 MB (Top 30.84%)
1 parent 7a7c9fd commit a437e87

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
// Runtime: 16 ms (Top 7.49%) | Memory: 101.1 MB (Top 30.84%)
12
class Solution {
23
public double averageWaitingTime(int[][] customers) {
34
double time = 0;
45
double waitingTime = 0;
5-
6+
67
for(int[] cust : customers){
7-
time = Math.max(cust[0],time);
8+
time = Math.max(cust[0],time);
89
time = time + cust[1];
910
waitingTime += (time - cust[0]);
1011
}
11-
12+
1213
return waitingTime/customers.length;
1314
}
14-
}
15+
}

0 commit comments

Comments
 (0)