Practice Average Waiting Time
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
customers[i] = [arrival,time] lists customers in nondecreasing arrival order and their cooking durations. One chef prepares their orders in that order, starting each when both the chef and customer are available. Waiting time runs from the customer arrival until their order finishes, including cooking time. Return the mean waiting time; error within 10^-5 is accepted.
Source: Average Waiting Time on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
customers = [[1,2],[2,5],[4,3]]
5.00000
# Example 2
customers = [[5,2],[5,4],[10,3],[20,1]]
3.25000
Constraints
Related LeetCode Problems
Practice more problems similar to Average Waiting Time.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.