Request Rate Limiter / Sliding Window

Asked at Okta · Coding Questions · Difficulty: Medium · Last asked Nov 5, 2025

Given a time-sorted list of (IP, timestamp) request pairs, a window W and an allowance Amnt, output accept/reject for each request: accept only if that IP has had no more than Amnt accepted requests in the past W seconds.

Loading the problem…