Roblox
Anonymous User
763

You are tasked with implementing a rate limiter that determines whether incoming requests should be allowed or denied based on a sliding time window.

Given:

A list of request timestamps in ascending order (each timestamp represents a request arrival time, in seconds),

A window length in seconds,

A maximum number of allowed requests within any given window,

return a list of booleans, where each element indicates whether the corresponding request should be allowed (true) or denied (false).

Comments (6)