Interview R1 Question | Morgan Stanley

Anonymous User
751
Jun 26, 2025
Jun 26, 2025

Implement a rate limiter for incoming requests based on the IP address.
Each IP address should be allowed to make up to 10 requests per minute.
If an IP exceeds this limit within one minute, further requests from that IP should be denied until the minute window resets.

Approach: Using Hashmap we can store timestamp and count as value and ip as key.

Comments (2)