Problem Statement:


Design a hit counter which counts the number of hits received in the past 5 minutes (i.e., the past 300 seconds).

Your system should accept a timestamp parameter (in seconds granularity).

All the calls are being made to the system in chronological order, i.e., timestamp is monotonically increasing. Several hits may arrive roughly at the same time.

Implement the Hit Counter.

Solution:



This is a Premium Content.
Please subscribe to Low Level Design course to access the content.




The above content is written by:

Abhishek Dey

Abhishek Dey

A Visionary Software Engineer With A Mission To Empower Every Person & Every Organization On The Planet To Achieve More

Microsoft | University of Florida

View LinkedIn profile


If you have any feedback, please use this form: https://thealgorists.com/Feedback.




Subscribe to Our Youtube Channel

Follow Us On LinkedIn
wave