Loading...

The Throttle Wall

A hard Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
hard
Seniority
mid, senior, staff

Problem

Our API gateway needs to throttle abusive clients without blocking legitimate traffic. Build a RateLimiter class that tracks requests per client and enforces a maximum number of allowed requests within a sliding time window. Denied requests should not count toward the limit.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.