The situation
The company is a venture-backed grocery-delivery startup operating across Munich's urban zones, where four-hour delivery windows and a fleet of around 120 part-time riders make slot assignment a daily bottleneck for its small dispatch team.
Your task
Replace manual delivery-slot assignment with a greedy algorithm that matches or beats human dispatchers on slot-fill rate while never violating rider working-hour constraints.
The brief
What you do
- Using the provided order history sample, rider roster, and manual dispatch baseline, design and implement a greedy slot-assignment algorithm in Python.
- The algorithm must (1) sort incoming orders by a priority you can defend, for example orders with the narrowest acceptable delivery window first, (2) assign each order to the rider whose earliest available four-hour slot satisfies the order's preference and that rider's shift and maximum-working-hour constraints, and (3) handle the 'no rider fits' case explicitly rather than silently dropping the order.
- Validate against the manual dispatch baseline on three metrics: slot-fill rate, customer-preferred-slot match rate, and rider-utilization variance.
- Reference only the three provided materials; no external data is required.
Success looks like
Success means a working algorithm that never violates a roster constraint in the provided data, beats or matches the manual baseline on at least two of the three metrics, and comes with an honest analysis of the conditions under which the greedy approach degrades.
What you will practice
- Design a greedy heuristic with a defensible priority ordering for a constrained assignment problem.
- Translate real-world scheduling constraints (shifts, maximum working hours, slot windows) into explicit code checks.
- Define fair, well-specified benchmark metrics and compare a heuristic against a human baseline.
- Reason about and communicate the failure modes of a greedy approach versus full optimization.
- Structure a technical design proposal that ties every claim to observable evidence in the data.
A suggested way in
- Consider sorting orders by ascending slot-window width so the most-constrained orders are placed first, and justify the choice against alternatives.
- Use a priority queue or sorted structure to find each rider's earliest available fitting slot efficiently.
- Define slot-fill rate, preferred-slot match rate, and utilization variance precisely before computing them, and apply the same definitions to the manual baseline.
- Construct adversarial mini-scenarios (a demand spike, an understaffed day) to expose where greedy underperforms an optimal assignment.
Skills you will practice
Greedy algorithms, Algorithm analysis, Python, Constraint handling, Benchmarking, Data structures
Where it leads
Backend / Algorithms Engineer, Logistics Optimization Engineer, Data / Decision Engineer
How it is assessed
- Correctness25%
On the provided order history and rider roster, the algorithm produces assignments that never violate a rider's shift or maximum-working-hour constraint, verified by the pytest suite.
- Greedy reasoning25%
The proposal defends its priority ordering with a clear argument or proof sketch grounded in the structure of the order history data.
- Benchmark quality30%
Comparison against the manual dispatch baseline uses explicitly defined, fairly applied metrics computed over the same provided orders.
- Limit honesty20%
The limitations section names concrete conditions in or beyond the provided data where greedy degrades and states what to do instead.
Resources
- PythonTool
Primary language for implementing and testing the greedy assignment algorithm.
- pandasTool
Load the order history and roster data and compute the benchmark metrics.
- pytestTool
Assert that constraints are never violated across the provided dataset.
- MatplotlibTool
Visualize slot-fill and utilization comparisons against the manual baseline.
Finish it. Earn this.
A verified certificate with your name. Anyone can check it.
Time to practice.
Solve this challengeMore like this.
- Software EngineerDesign a Verified UART Receiver and Loopback for an FPGA Sensor Hub
- Data ArchitectDesigning a Data Warehouse for a Renewable Energy Firm
- Database AdministratorCut a 42-Minute Trino Query to Under Five Minutes
- AI Solutions ArchitectBuild an OWL Ontology for a Pharma R&D Knowledge Base
-
Design a Verified UART Receiver and Loopback for an FPGA Sensor Hub Software Engineer Propose and deliver a UART receiver for Helax's sensor hub that meets the functional requirements in the requirements brief (the 'uart-requirements-br veriloguartfpga Open challenge → -
Designing a Data Warehouse for a Renewable Energy Firm Data Architect You are given sample data from three sources: energy production logs, weather data, and equipment maintenance records. Your task is to: (1) design a s data warehousingstar schemaetl Open challenge → -
Cut a 42-Minute Trino Query to Under Five Minutes Database Administrator Using the slow query, the EXPLAIN ANALYZE readout, the Iceberg table schemas, and the 30-day execution-metrics dataset provided, design an optimizatio trinosql optimizationiceberg Open challenge → -
Build an OWL Ontology for a Pharma R&D Knowledge Base AI Solutions Architect You receive a CSV-form starter knowledge base (around 4,000 compounds, 600 targets, 1,200 assays) and a list of 12 competency questions the scientists ontology designowlknowledge representation Open challenge →