← Uber Interview Insights

Uber·Data Scientist·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

Uber DS interview that went deep into real-time dispatch system design for airport pickups. One question, but it was a beast, covering optimization, uncertainty handling, and algorithmic theory all at once. Left feeling like I'd only scratched the surface.

Questions Asked (1)

Q1

Design an online dispatch algorithm for airport pickups that minimizes passenger wait time and deadhead miles. Your system receives streaming flight ETAs with Gaussian uncertainty and live driver positions. Walk through the objective function, data structures, algorithmic approach, how you handle ETA updates and cancellations, fairness across drivers, complexity analysis, competitive ratio or worst-case bounds, and a fallback strategy for demand spikes.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This question is basically five questions stapled together and they want you to hold all of it in your head simultaneously.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by formalizing the objective function that balances passenger wait time and deadhead miles, then describe a streaming assignment system that handles uncertainty via probabilistic ETA distributions. Walk through the data structures, algorithmic approach, and how you update assignments as new information arrives, while addressing fairness, complexity, and fallback strategies.

Pro tip: Emphasize the trade-off between optimality and real-time constraints: use a rolling horizon with approximate algorithms (e.g., greedy with lookahead) and quantify the competitive ratio under worst-case scenarios to show rigor.

1. Define Objective and Constraints

Formalize the objective as a weighted sum of expected passenger wait time and deadhead miles, subject to driver availability, vehicle capacity, and fairness constraints. Discuss how to incorporate Gaussian ETA uncertainty (e.g., using expected values or chance constraints).

2. Design Data Structures and Streaming Architecture

Propose data structures for efficient nearest-neighbor queries (e.g., KD-trees, geohashes) and priority queues for pending requests. Describe a streaming pipeline that ingests flight ETA updates and driver locations, triggering reassignment when significant changes occur.

3. Develop Assignment Algorithm

Outline a rolling-horizon assignment algorithm: at each time step, solve a bipartite matching problem (e.g., Hungarian algorithm) on a subset of drivers and requests, using expected wait and deadhead costs. For scalability, consider greedy or auction-based approximations.

4. Handle Dynamics: Updates, Cancellations, Fairness

Explain how to update assignments when flight ETAs change (e.g., re-optimize affected matches) and handle cancellations by freeing drivers. Incorporate fairness via constraints like max wait time per driver or rotating priority.

5. Analyze Complexity, Bounds, and Fallbacks

Provide complexity analysis (e.g., O(n^3) for Hungarian, O(n log n) for greedy) and discuss competitive ratio or worst-case bounds. Propose fallback strategies for demand spikes, such as surge pricing, driver rebalancing, or relaxed fairness constraints.

Key Points to Mention

  • Objective function: weighted combination of expected passenger wait time and deadhead miles, with uncertainty from Gaussian ETAs.
  • Data structures: spatial indexes (KD-tree, geohash) for driver locations, priority queues for requests, and efficient update mechanisms.
  • Algorithmic approach: rolling horizon with bipartite matching (Hungarian) or greedy/auction algorithms for scalability.
  • Dynamic updates: re-optimization triggers on ETA changes, cancellation handling, and fairness constraints (e.g., max wait per driver).
  • Complexity and bounds: time/space complexity of chosen algorithms, competitive ratio analysis, and worst-case scenarios.
  • Fallback strategy: demand spike mitigation via surge pricing, driver incentives, or temporary relaxation of fairness constraints.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.