Algorithms and Data Structures: TheAlgorist.com
System Design: SystemsDesign.Cloud
Low Level Design: LowLevelDesign.io
Frontend Engineering: FrontendEngineering.io
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 in Java and Python:
This is a Premium Content.
Please subscribe to Low Level Design course to access the content.
If you have any feedback, please use this form: https://thealgorists.com/Feedback.
Follow Us On LinkedIn