Per-User Rate Limiter
Asked at Reddit · Coding Questions · Difficulty: Medium · Last asked Mar 13, 2026
Build a rate limiter that decides, for each user separately, whether a request arriving at a given time may go through. A user may have at most a fixed number of accepted requests within any recent window of time; further requests are rejected until older ones fall out of the window.
Loading the problem…