Amazon Interview Question

design an API function (rate limiter)