Uber Interview Questions
Practice the exact questions companies are asking right now.
Find earliest time all riders become connected
You are given activity logs for a ride-sharing app. Each log entry indicates that two riders shared a ride at a certain time, which creates an undirec...
Find robots matching obstacle-distance signature
You are given a 2D grid and a distance signature dist = [left, top, bottom, right]. Grid Each cell is one of: - O : a robot - E : empty - X : obstacle...
Measure feature impact with switchback, PSM, and CACE
You work at a ridesharing company and want to measure the impact of a new membership feature on rides-per-user (RPU). Part A — Switchback experimentat...
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...
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...
Bracket substrings matching any pattern
Problem You are given a sentence s (words separated by single spaces) and a list of strings patterns. For each word in the sentence, if the word conta...
Find all dictionary words in a grid
You are given: - A 2D grid of characters board with m rows and n columns. - A list of strings words (a dictionary). A word can be formed by starting f...
Design metrics and A/B test for maps and ETA
Context You work on Uber’s driver app. Drivers can navigate using either Google Maps or Uber Maps. Separately, Uber shows riders an estimated time of ...
Design Uber Eats-style search function
Design the search function for a large-scale food delivery platform similar to Uber Eats. A user opens the app and types queries such as: - Restaurant...
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 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...
Return sorted squares of a sorted array
Problem You are given an integer array nums sorted in non-decreasing order. The array may contain negative numbers. Return a new array containing the ...
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...
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...
Solve jump maximization and palindromic path queries
You are given two independent algorithmic problems. --- Problem 1 — Jump game with special destinations (maximize score) You are given an integer arra...
Compute minimal time to finish dependent tasks
Coding: Task Scheduling With Prerequisites (Parallel Allowed) You have n tasks labeled 1..n. Each task takes exactly 1 unit of time to complete. Some ...
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...
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...
Implement an expiring counter class
Expiring Counter (sliding time window) Design and implement an expiring counter that counts events in a recent time window. Requirements - You are giv...