Uber Interview Questions
Practice the exact questions companies are asking right now.
Transform DataFrame and compute diff-in-diff
You are given a pandas DataFrame df with the following columns: - unit_id (string): entity identifier (e.g., user, city, driver) - group (string): eit...
Find cheapest flight with at most K stops
Problem You are given a directed weighted graph representing flights between cities. Inputs - An integer n: number of cities, labeled 0..n-1. - A list...
Choose K pickup locations minimizing L1 distance
Coding: K Shuttle Pickup Locations (L1) You are given the coordinates of N people on a 2D grid. You want to open K shuttle pickup locations (pickup po...
Measure Impact of Updated Rider ETA Algorithm
Scenario A ride-hailing company has updated its rider ETA-prediction algorithm (the ETA shown to riders before they request a trip) and wants to quant...
Design a switchback and choose block length
Switchback Experiment Design: Airport Pickup Pricing with Spillovers Context You are designing a switchback (time-based A/B) experiment for airport pi...
Design a restaurant recommendation system
ML System Design: Restaurant Recommendations (Delivery App) You are designing a restaurant recommendation system for a food delivery marketplace (e.g....
Design station experiment with interference and rush-hour spillovers
Experiment Design Under Interference for an In‑Station Ordering Pilot Context (Completed) You are evaluating two competing in‑station ordering feature...
Design real-time driver heatmap
Design a Real-Time Driver Heatmap (500k events/sec) You are designing a real-time heatmap service for a ride‑hailing app. Mobile clients send frequent...
Estimate causal effect with interference
A/B Test With Noncompliance and Interference: Causal Effect of Surge Recommendations on Completed Trips Context You ran an A/B test that assigned some...
Compute exclusive execution time from logs
Problem You are given execution logs from a single-threaded CPU that runs n functions labeled 0..n-1. The CPU can run only one function at a time. A f...
Design real-time driver heatmap system
System Design: Real-Time Driver Heatmap and Top-K Hottest Cells Context You are building a real-time heatmap for a ride-hailing platform to show drive...
Design an A/B test for promo-targeting models
Experiment Design: Compare Two Ranking Models (M1 vs M0) for $5 Promotions Context You have two models, M0 (current) and M1 (new), that rank users for...
Implement sqrt with Newton vs binary search
Implement numerically robust square-root routines and analyze convergence Task 1 — sqrt_newton(x, tol=1e-12) Implement a Python function that returns ...
Detect cycle in directed dependency graph
You are given a directed dependency graph representing services in a system. - There are n services, labeled from 0 to n - 1. - You are given a list o...
Design real-time grid ETA for drivers
Real-Time Grid-ETA System Design You are tasked with designing a real-time system that maintains the remaining ETA for every driver currently located ...
Implement convex minimization on an interval
Task: Minimize a Black-Box Convex Function on [a, b] Using Only Function Evaluations Context You are given a real-valued, convex function F(x) defined...
Define market-only rider experience metrics
Market-only Rider Experience Metrics and Market Balance Index (MBI) You are designing a metric suite for a rides marketplace where "rider experience" ...
Check anagrams under real-world constraints
Given two strings s and t, determine whether they contain exactly the same multiset of characters (e.g., 'abc' and 'cab' → true; 'aab' and 'ab' → fals...
Design top-K frequency structure
Design an in-memory data structure that supports: add(x) to observe an item, inc(x) to increment its frequency, dec(x) to decrement (deleting when zer...
Solve minimum rate and subset sum
1) Minimum rate to finish vaults within a deadline: You are given an array vaults of positive integers representing the amount in each vault along a r...