# 1701. Average Waiting Time ###### tags: `Leetcode` `Medium` `Simulation` Link: https://leetcode.com/problems/average-waiting-time/description/ ## Code ```python= class Solution: def averageWaitingTime(self, customers: List[List[int]]) -> float: currTime = 0 totalWaiting = 0 for arrival, time in customers: if currTime<arrival: currTime = arrival currTime += time totalWaiting += currTime-arrival return totalWaiting/len(customers) ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up