New
Dark mode is now available across the site
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Google
Coding Question
AI Insights
Quick Summary
Design a persistent rate limiter that processes one domain request per second.
Enforce two sliding window constraints per domain: max 2 requests in 5 seconds and max 5 in 30 seconds.
Track global time and only count accepted requests toward future limits.
What This Tests
Hash table usage for domain-specific state management
Sliding window logic over discrete time steps
Efficient data structure operations for expiry cleanup
State persistence across function calls
Common Patterns
Sliding Window
Hashing
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
36
/115
Acceptance Rate
31.3%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected