1701. Average Waiting Time

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 1701

class Solution:
    def averageWaitingTime(self, customers: List[List[int]]) -> float:
        tot = t = 0
        for a, b in customers:
            t = max(t, a) + b
            tot += t - a
        return tot / len(customers)