The Throttle Wall
A hard Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- hard
- Seniority
- L4
Interview Prompt
Implement RateLimiter(max_requests, window_ms). is_allowed(client_id, timestamp) returns True when the client has strictly fewer than max_requests recorded in the window (timestamp - window_ms, timestamp], then records the current timestamp. Test harness: ['init', max, window] then ['is_allowed', client, ts] calls; returns parallel results (None for init, True/False for each is_allowed).
Summary
Stop the abusers. Let the rest through.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision