SoloMedium15m

The Batch That Left a Worker Idle

### P2 · Work waits while capacity sits idle A synthetic batch contains 3 tasks and 3 workers. The starter assigns two tasks, leaves one waiting and one worker idle, although the approved eligibility rules allow full coverage.

Your task: Repair only assign_workers(eligibility) in assignment.py. Return a maximum-size valid task-to-worker plan: each task and each worker appear at most once, and every pairing must be permitted. Any maximum plan is accepted. A genuinely infeasible full batch should return its best partial plan.

Investigate: Run python monitor.py and python -m pytest -q. Preserve full-input validation and input snapshots. Handle duplicate eligibility entries, disconnected groups, identical task/worker labels and long chains of competing choices.

Proof: Show both validity and maximum cardinality without enumerating every possible plan. Open a PR against main with regression evidence.

This is a fictional one-shot planning exercise. No live dispatch, fairness-over-time, weighted costs or production performance claim is implied. Local tests do not certify live GetIn integration.

Skills you'll prove

pythonbipartite-matchingalgorithmsassignmenttestingbook-vs-prod

Interview Tip

I separated a valid assignment from a maximum assignment. I modeled task eligibility as a bipartite graph and used augmenting paths to improve the plan while maintaining one-to-one capacity. An independent small-graph oracle and input-order regressions verified cardinality rather than requiring one arbitrary optimal pairing.

Browse freely — sign in when you're ready to open a ticket and prove your skills.