Online Food Order Assignment System
Implement and debug an online food ordering system with classes for orders, kitchens, chefs, and dishes. Fix a bug in the order completion check and implement chef assignment logic that maps dishes to chefs while tracking order status.
Asked at:
Meta
Hello Interview Premium
Hello Interview Answer Key
Kitchen Orders
A detailed walkthrough of the Kitchen Orders problem, covering the approach, implementation, and optimization.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late May, 2026
Meta
Senior
Late May, 2026
Meta
Senior
Restaurant Kitchen Welcome to the Kitchen Rush! You're managing a busy restaurant kitchen during dinner service. The Problem Orders come in with dishes that need to be prepared at different stations: * PREP: Chopping, mixing * GRILL: Cooking meats * STOVE: Sauces, pasta * PLATE: Final assembly Each dish follows a recipe - a specific sequence of stations. For example: * Burger: PREP (4 min) → GRILL (8 min) → PLATE (2 min) * Pasta: PREP (3 min) → STOVE (10 min) → PLATE (2 min) * Salad: PREP (4 min) → PLATE (1 min) Constraints * Each chef can only work on one dish at a time * Each station can only have one chef working at it at a time * There is only one of each type of station (one GRILL station, one PREP station, etc.) * A dish must complete its current station step before moving to the next * You only see orders after they arrive and cannot see future orders Scoring * On time: Full points * 1-5 min late: Half points * More than 5 min late: Zero points Your Task P1: Warmup Run the P1 tests. There is a bug in the codebase - find it and fix it! P2: Basic Expediter An expediter coordinates the kitchen, deciding which chef works on which dish. Your task is to implement MyExpediter in my_expediter.py. Your goal is a basic, working solution that can process orders with multiple chefs. Don't worry about optimization yet - just get orders completed! P3: Chef Specialization Handle chefs with different speed profiles: * Alex: Fast at PREP (1.5x), slow at GRILL (0.7x) * Blair: Fast at GRILL (1.4x) and STOVE (1.2x), slow at PREP (0.8x) * Casey: Generalist (1.0x) * Dana: Fast at STOVE (1.3x) and PREP (1.2x), slow at PLATE (0.9x) P4: Rush Hour Run the P4 test to simulate a full week of dinner service with lots of orders arriving at different times. Focus on optimizing your expediter for the weeknight scenario first — maximize your average score across the 7 days! Once you're happy with your weeknight performance, the test also shows bonus scores for three other scenarios (happy_hour, holiday_eve, brunch) that have different order patterns. You can investigate a specific scenario in detail by changing the SCENARIO variable in the main file. P5(a): Chef Exhaustion Chefs get exhausted if they're assigned dishes continuously. After X continuous assignments, their efficiency is halved, after Y continuous assignments, they need to take rest P5(b): Station Breakdown ??? Tips * Use kitchen.get_free_chefs() to find available chefs * Use kitchen.get_all_incomplete_dishes() to find dishes needing work * Use kitchen.is_station_free(station) to check station availability Good luck!
Mid May, 2026
Meta
Senior
Your account is free and you can post anonymously if you choose.