Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Implement a system that enforces a maximum number of requests within a moving time window.
Track incoming request timestamps to determine when older requests expire from the window.
Return true or false based on whether the current request fits within the active capacity limit.
What This Tests
Sliding window algorithm
Queue data structure operations
Time-window state tracking
Concurrency-safe system design
Common Patterns
Sliding Window
Queue
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Accepted
2.3k
/3.1k
Acceptance Rate
75.5%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Python3
Auto
Debug
Run
Submit
Stdout
-