Original practice scenario: A hypothetical snack distributor assigns batches to store orders with minimum remaining shelf life. Explain an algorithm and its limitations.
Read model answer +
Eligibility depends on arrival date and each order's shelf-life requirement. First-expiry-first-out is useful only among compatible batches, and a greedy choice can block a later constrained order.
Work through it
Validate units, estimated arrival times and expiry dates, then construct eligible batch-order relationships with quantities and documented tie-break rules.
Use a deterministic heuristic for simple cases or a flow/optimization formulation when competing constraints matter; independently validate all resulting allocations.
Test scarce long-life stock, partial orders, identical expiry dates and delayed delivery, checking quantity conservation and unmet-order explanations.
Tradeoffs to discuss
Optimization can improve global fulfillment but costs computation and needs a clear objective; heuristics are simpler with weaker guarantees.
Common pitfalls
Do not allocate a batch based only on its departure-day shelf life.
Re-evaluate eligibility when an arrival estimate changes.
Original practice scenario: A retail simulator records shelf audits at irregular times and extra visits to troubled stores. How would you summarize availability?
Read model answer +
An audit-row average measures observations, not automatically store-time availability. Extra visits to problematic stores change the sample, so the denominator must match the intended reporting question.
Work through it
Define the target as sampled-visit availability or estimated store-time exposure, retaining visit reason, timestamp, product and store identifiers.
Deduplicate repeated audits within the chosen observation unit and use an explicit weighting or sampling design if estimating a broader population.
Report coverage and missingness by store and period, compare routine and exception visits, and test products absent from an audit separately from recorded stockouts.
Tradeoffs to discuss
Routine-only samples improve comparability but omit useful exception information; combining both requires transparent assumptions.
Common pitfalls
Do not interpret an unrecorded product as available or unavailable by default.
A SQL calculation cannot remove selection bias that the data collection design does not identify.