← 返回 instacart 的题目列表Calculate Average Time
类型:online_judge
Design a system to calculate average time for specific operations with the following functionalities: 1. Record start time of an operation; 2. Record end time; 3. Query average time for specific operations. Handle a high volume of requests efficiently.
Example
Input
startOperation('load')
delay(1000)
endOperation('load')
queryAverageTime('load')
Output
[1000]