Design Hit Counter
Design a HitCounter that counts the number of hits received in the past 5 minutes (300 seconds).
It should support two operations:
hit(timestamp): record a hit attimestamp(in seconds).- `g...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
