← 返回 databricks 的题目列表Hit Counter
类型:online_judge
Design a hit counter that counts the number of hits received in the past 5 minutes. It should support the following operations:
hit(timestamp): record a hit
getHits(timestamp): return the number of hits in the past 5 minutes
The timestamp is always increasing sequentially.