LC: 359. Logger Rate Limiter - spiralgo/algorithms GitHub Wiki
359. Logger Rate Limiter:
The Essence:
The question tries to teach:
- How to define a class in the programming language of choice.
- How to keep track of incoming
messagesandtimestamps.
Details:
- It would be better for the problem-solver to learn how to create a class in the programming language of choice before starting the solution.
- We can use the message as a
keyand the timestamp (plus 10 seconds) as avalueof aHashMapto keep track of these pieces of information.