Loading...

The Traffic Director

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

Domain
Python
Difficulty
easy
Seniority
mid, senior

Problem

A distributed systems team needs to implement round-robin request routing across a pool of servers. Given a list of server names and a list of request identifiers, return a dictionary mapping each request to the server it is assigned to using round-robin distribution.

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.