Skip to content

Commit 8581d37

Browse files
committed
1701
1 parent f343523 commit 8581d37

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Jul-9-24.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def averageWaitingTime(self, customers: List[List[int]]) -> float:
3+
i = 0
4+
wt = 0
5+
t = customers[0][0]
6+
while i<len(customers):
7+
st = customers[i][0]
8+
t = t+customers[i][1] if t>customers[i][0] else st+customers[i][1]
9+
wt += t-st
10+
i += 1
11+
return wt/len(customers)

0 commit comments

Comments
 (0)