← Uber Interview Insights

Uber·Data Scientist·Technical Phone Screen·Senior

SeniorPrefer not to say
Apr 2026Remote

Summary

Uber DS interview that went deep into marketplace operations. The main question was a multi-part monster covering metric design, optimization modeling, and experiment design all in one sitting. Walked out not totally sure how I did.

Questions Asked (5)

Q1

How would you define and measure driver backtracking in a ride-share marketplace? Specifically, design a quantitative metric per driver-hour using GPS and assignment logs, and describe how you'd detect and validate backtracking segments.

Product Analytics & MetricsAlgorithms & Data Structures
Author's notes

I started with a basic 'ratio of distance traveled backward vs forward' framing and the interviewer pushed back pretty fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Define backtracking as unnecessary reverse movement along a driver's route relative to the optimal path to a pickup or destination, then operationalize it as a per-driver-hour rate using GPS traces and assignment logs. Describe a robust pipeline: clean and map-match GPS, segment trips, detect backtracking via distance/time thresholds and path comparison, and validate with simulation and manual review.

Pro tip: Frame the metric in terms of business impact—backtracking wastes driver time and fuel, reduces marketplace efficiency, and can signal poor routing or assignment logic—so your metric ties directly to Uber's goals. Also, acknowledge trade-offs: a too-sensitive threshold may flag legitimate detours (e.g., traffic, road closures), so validation against ground truth is essential.

1. Define backtracking precisely

Specify backtracking as a driver moving away from the optimal path to the next assignment (pickup or drop-off) by a significant distance or time, excluding necessary detours due to traffic or road network constraints. Use assignment logs to know the intended destination and GPS to track actual movement.

2. Construct the per-driver-hour metric

Compute total backtracking distance (or time) per driver per hour: sum the lengths of detected backtracking segments across all trips in a driver's shift, then divide by total active driver-hours. Normalize to account for varying shift lengths and trip volumes.

3. Detect backtracking segments from GPS

Map-match GPS points to the road network, then compare the actual path to the optimal route (e.g., from a routing engine). Flag segments where the driver's movement increases the remaining distance to the destination by more than a threshold (e.g., 500m or 2 minutes) and persists for a minimum duration.

4. Validate detection with ground truth

Validate using manual review of sampled segments, simulation of known backtracking patterns, and correlation with external data (e.g., traffic incidents, road closures). Also check for false positives from GPS noise or map-matching errors.

5. Monitor and iterate

Deploy the metric in dashboards, monitor distribution and trends, and iterate on thresholds and definitions based on feedback from operations and drivers. Use A/B tests to see if interventions reduce backtracking and improve efficiency.

Key Points to Mention

  • Use of map-matching to align GPS points to road network and compute path deviations.
  • Definition of optimal path: shortest or fastest route from current location to next assignment, considering real-time traffic.
  • Thresholds for backtracking: minimum distance (e.g., 500m) and/or time (e.g., 2 minutes) moving away from destination.
  • Normalization by driver-hour to compare across drivers and shifts, accounting for active vs. idle time.
  • Validation techniques: manual labeling, simulation, and cross-referencing with traffic/road closure data.
  • Business impact: reduced driver earnings, increased ETAs, higher cancellation rates, and environmental cost.

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

Q2

Formulate an optimization model that assigns drivers to ride requests and repositioning tasks to minimize expected backtracking, while satisfying constraints on ETA service levels, minimum driver utilization, zone fairness, and a cap on repositioning costs. State decision variables, objective function, and constraints explicitly.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is where things got long.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the decision variables clearly, distinguishing between assignment and repositioning. Then formulate the objective as minimizing expected backtracking, expressed as a function of these variables. Finally, explicitly state each constraint (ETA service levels, driver utilization, zone fairness, repositioning cost cap) in mathematical terms.

Pro tip: Mention that the model should be solved as a mixed-integer linear program (MILP) or a min-cost flow problem, and discuss potential trade-offs and scalability. This shows awareness of practical implementation challenges.

1. Define Decision Variables

Introduce binary variables for assigning drivers to ride requests and repositioning tasks, and continuous variables for expected backtracking or costs.

2. Formulate Objective Function

Express the objective as minimizing expected backtracking, which could be a weighted sum of distances or probabilities of future requests.

3. Specify Constraints

List constraints: ETA service levels (e.g., maximum wait time), minimum driver utilization (e.g., percentage of time on trips), zone fairness (e.g., equitable distribution of drivers), and repositioning cost cap.

4. Discuss Solution Approach

Briefly mention how to solve the model (e.g., MILP, min-cost flow) and address scalability and real-time considerations.

Key Points to Mention

  • Decision variables: binary assignment variables x_{ij} for driver i to request j, and repositioning variables y_{ik} for driver i to zone k.
  • Objective: minimize sum over i,j of c_{ij} x_{ij} + sum over i,k of d_{ik} y_{ik}, where c and d represent expected backtracking costs.
  • ETA service level constraint: for each request, sum of assignments >= 1, and expected wait time <= threshold.
  • Driver utilization constraint: sum of assigned trips and repositioning time >= minimum utilization per driver.
  • Zone fairness constraint: number of drivers assigned to each zone proportional to demand, or within a tolerance.
  • Repositioning cost cap: total repositioning cost <= budget.

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

Q3

Which modeling approach would you choose for this problem, such as time-expanded network min-cost flow or a mixed-integer program, and how would you solve it in real time? Discuss options like rolling horizon, column generation, or Lagrangian relaxation and comment on approximation quality.

Algorithms & Data StructuresTechnical Trade-offsSystem Design
Author's notes

I picked rolling horizon because it's the most operationally realistic and I've seen it work in similar contexts.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem characteristics (e.g., problem size, time constraints, objective, and whether decisions are online or offline) to justify the modeling choice. Then compare time-expanded network min-cost flow and mixed-integer programming in terms of scalability, solution quality, and real-time feasibility, and propose a hybrid or decomposition approach. Finally, discuss solution methods like rolling horizon, column generation, and Lagrangian relaxation, and how to balance approximation quality with computational speed.

Pro tip: Emphasize that in real-time systems, the goal is often to find a good solution quickly rather than the optimal one, so discuss how you would measure and control the trade-off between solution quality and latency.

1. Clarify the problem

Ask questions to understand the problem size, time constraints, objective, and whether it's a static or dynamic setting. This determines whether a time-expanded network or MIP is more appropriate.

2. Compare modeling approaches

Discuss the strengths and weaknesses of time-expanded network min-cost flow (efficient for large-scale, linear costs) versus mixed-integer programming (flexible for complex constraints but computationally expensive).

3. Propose solution methods

Explain how rolling horizon, column generation, or Lagrangian relaxation can be used to solve the problem in real time, and under what conditions each is suitable.

4. Address approximation quality

Discuss how to evaluate and control the trade-off between solution quality and computation time, including bounds, heuristics, and fallback strategies.

5. Conclude with a recommendation

Summarize your chosen approach, justifying it based on the problem characteristics and real-time requirements, and mention potential extensions or improvements.

Key Points to Mention

  • Time-expanded network min-cost flow is efficient for large-scale problems with linear costs and can be solved with specialized algorithms.
  • Mixed-integer programming offers flexibility for complex constraints but may not scale to real-time unless decomposed or relaxed.
  • Rolling horizon is effective for dynamic problems, solving a sequence of smaller subproblems over time.
  • Column generation is useful when the number of variables is huge, but it may require solving a pricing problem repeatedly.
  • Lagrangian relaxation can provide good bounds and decomposable solutions, but may require careful tuning and may not always yield feasible solutions.
  • Approximation quality can be managed by setting time limits, using heuristics, or accepting suboptimal solutions with known bounds.

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

Q4

How would you evaluate improvements to the backtracking reduction model both offline and through an online experiment?

A/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

Offline I said replay simulation on historical logs with the new assignment policy, measuring the backtracking metric against a baseline.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the backtracking reduction model and the specific improvements you're evaluating. Then outline a two-pronged evaluation: offline using historical data and simulations to measure accuracy and efficiency, and online via a controlled A/B test to measure impact on key business metrics. Emphasize the importance of aligning offline and online metrics and using guardrails to detect unintended consequences.

Pro tip: When designing the online experiment, ensure you have sufficient power and consider sequential testing to avoid peeking. Also, pre-register your metrics and analysis plan to prevent p-hacking and build trust with stakeholders.

1. Define the improvement and success metrics

Clearly state what the improvement is (e.g., reduced backtracking, faster convergence) and define both offline metrics (e.g., accuracy, precision, recall, computational cost) and online metrics (e.g., booking conversion, ETA accuracy, user engagement).

2. Offline evaluation

Use historical data to simulate the new model versus the old one. Measure performance on held-out data, conduct sensitivity analysis, and ensure the improvement generalizes across different segments and time periods.

3. Design the online experiment

Set up an A/B test with proper randomization, control, and treatment groups. Determine sample size and duration based on power analysis, and define guardrail metrics to monitor for negative side effects.

4. Analyze and interpret results

Compare offline and online results, check for statistical significance, and investigate any discrepancies. Use segmentation to understand heterogeneous treatment effects and ensure the improvement is robust.

5. Decide and iterate

Based on the combined evidence, decide whether to roll out, iterate, or abandon the improvement. Document learnings and consider follow-up experiments to further optimize.

Key Points to Mention

  • Offline metrics: accuracy, precision, recall, F1, computational efficiency, and simulation fidelity.
  • Online metrics: business KPIs like conversion rate, ETA accuracy, user retention, and system latency.
  • A/B testing best practices: randomization, sample size calculation, power analysis, and guardrail metrics.
  • Potential pitfalls: novelty effects, seasonality, network effects, and metric misalignment.
  • Statistical methods: hypothesis testing, confidence intervals, sequential testing, and causal inference.
  • Cross-validation between offline and online results to ensure consistency and reliability.

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

Q5

How would you handle demand uncertainty in this optimization model? Walk through using robust or stochastic optimization, and illustrate with a small example using three zones and five-minute intervals.

Technical Trade-offsData ModelingAdaptability & Ambiguity
Author's notes

The toy example request threw me off a little.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing demand uncertainty as a core challenge in optimization, then compare robust and stochastic optimization approaches, highlighting their trade-offs in a data science context. Use a concrete example with three zones and five-minute intervals to illustrate how each method handles uncertainty, and conclude with practical considerations for implementation at Uber.

Pro tip: Emphasize that the choice between robust and stochastic optimization depends on the business objective and data availability; at Uber, real-time decision-making often favors robust optimization for its computational efficiency and worst-case guarantees.

1. Define the problem and uncertainty

Clearly state the optimization goal (e.g., minimize wait time or maximize driver utilization) and identify sources of demand uncertainty (e.g., random ride requests). Mention that uncertainty can be modeled as scenarios or probability distributions.

2. Compare robust vs. stochastic optimization

Explain that robust optimization hedges against worst-case scenarios within an uncertainty set, while stochastic optimization optimizes expected performance over a probability distribution. Discuss trade-offs: robustness vs. optimality, computational complexity, and data requirements.

3. Illustrate with a small example

Use three zones (e.g., downtown, airport, suburbs) and five-minute intervals (e.g., 12 intervals per hour). For robust optimization, define an uncertainty set (e.g., demand varies ±20% from nominal) and solve for the worst-case. For stochastic optimization, assume a distribution (e.g., Poisson) and optimize expected demand.

4. Discuss implementation and evaluation

Mention how to evaluate solutions using metrics like expected cost, worst-case cost, and value of stochastic solution. Highlight practical considerations: data availability, computational time, and integration with real-time systems.

5. Conclude with recommendation

Summarize when to use each approach: robust for high uncertainty and risk-aversion, stochastic when reliable probabilistic data exists. Suggest hybrid approaches or scenario-based optimization as a middle ground.

Key Points to Mention

  • Uncertainty set definition in robust optimization (e.g., box, ellipsoidal, or data-driven).
  • Scenario generation and probability distributions in stochastic optimization (e.g., Poisson, empirical).
  • Trade-off between optimality and robustness: robust solutions may be conservative but computationally efficient.
  • Value of stochastic solution (VSS) and expected value of perfect information (EVPI) as evaluation metrics.
  • Computational complexity: stochastic optimization often requires solving large-scale linear programs or sample average approximation.
  • Practical considerations at Uber: real-time constraints, data sparsity, and need for interpretable models.

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