Old blog

30 Uber LeetCode Interview Questions for 2026

Written April 30, 2026Updated May 2, 20269 min read
pexels yankrukov 7693241

See the 30 Uber LeetCode interview questions reported most often, grouped by pattern families with prep advice for OA, onsite, and L5+ rounds.

Uber LeetCode Interview Questions: 30 Most Asked (2026)

Uber's coding questions cluster around four pattern families — and once you see the patterns, the question list stops feeling random. This post breaks down the 30 problems that show up most often in Uber's coding rounds, organized by pattern rather than difficulty, with honest prep guidance for both new-grad and senior (L5+) candidates.

The company's core product — routing, dispatch, surge pricing, real-time maps — maps directly to graph traversal, streaming aggregation, sliding-window constraints, and cache design. Knowing that shapes how you study.

What Uber's coding rounds actually look like

Round structure overview

Uber's full interview loop typically runs about four weeks end to end. The stages, in order:

  • Online Assessment (OA) — timed, real round, not a warmup
  • Technical Phone Screen — one coding problem, live with an engineer
  • Onsite Coding — two to three coding rounds
  • Specialization / Machine Coding — build a working component (senior candidates)
  • System Design — scale-focused, real numbers expected
  • Behavioral / TLM (Technical Leadership & Management) — project deep-dives, leadership stories

What Uber evaluates beyond correctness

Getting the right answer is necessary but not sufficient. Uber interviewers care about:

  • Code readability. Interviewers have explicitly flagged unreadable code even when the logic was correct. One candidate's onsite feedback noted that code readability was questioned and debugging hints were needed.
  • Runnable, edge-case-aware code. Pseudocode is not enough. Uber expects code that compiles and handles edge cases.
  • Reasoning, not just output. You need to explain why you chose an approach — the tradeoff between brute force and optimal, the data structure decision, the complexity analysis — not just produce a solution.

For senior candidates (L5A+), the bar goes deeper. Follow-up questions push into O(1)-space BST traversal (Morris traversal), weighted-graph variants, and machine coding problems that test design judgment alongside implementation.

Fresher vs. experienced expectations

Fresher (0–3 years):

  • Medium-difficulty graphs, arrays, sliding window
  • Clean, readable code with clear variable naming
  • Explain tradeoffs even when the interviewer doesn't ask

Experienced (L5+):

  • Hard DP, graph variants, machine coding design problems
  • System design with real numbers (throughput, storage, latency)
  • Detailed project retrospective for the TLM round

The 4 pattern families Uber loves

Uber's coding questions cluster tightly around four families. Knowing the pattern is faster than memorizing individual problems.

Graphs & BFS/DFS

Uber's core product is a graph problem. Routing, maps, dispatch — all graph traversal at scale. Expect shortest-path problems with weighted edges, topological sort for dependency ordering, union find for connected components, and clone-graph variants that test pointer handling.

Sliding window & two pointers

Streaming data and real-time metrics are central to Uber's backend. Sliding-window problems — longest substring with a constraint, subarray within a limit, meeting-room scheduling — test whether you can maintain state efficiently as a window moves.

Heaps & streaming data

Leaderboards, surge pricing, and driver matching all involve top-K selection and median-stream computation. Two-heap patterns (find median from data stream) and bucket-sort variants (top-K frequent elements) show up repeatedly.

Cache & design fundamentals

Machine coding rounds at Uber often ask candidates to implement a working system component — not design it on a whiteboard, but build it. LRU Cache, hit counters with sliding windows, and expiry-based counters are staples.

Uber LeetCode interview questions — the full list of 30

These 30 problems are drawn from reported Uber interview experiences and community-verified question lists. They are grouped by pattern, not difficulty, because Uber interviewers think in patterns.

Top tier problems (highest reported frequency)

  • Bus Routes — BFS on graph — tests multi-source shortest path thinking (example: output 2 for minimum buses to reach target)
  • Alien Dictionary — Topological sort — tests DAG construction from implicit character ordering (example: output "wertf")
  • Number of Islands — DFS — core graph traversal on a grid
  • Number of Islands II — Union Find — dynamic connectivity as land is added
  • Course Schedule / Course Schedule II — Cycle detection in directed graph — mirrors dependency scheduling; reported directly in Uber onsite loops
  • Clone Graph — Graph traversal with state — tests reference handling and visited-node tracking
  • LRU Cache — HashMap + doubly linked list — machine coding staple at Uber (example: get returns 1, then -1 after eviction)
  • Design Hit Counter — Sliding window + design — streaming counter directly relevant to Uber metrics (example: output 3, 4, 3)
  • Find Median from Data Stream — Two heaps — real-time aggregation pattern
  • Top K Frequent Elements — Heap or bucket sort — leaderboard and surge pricing analog
  • Merge Intervals — Sorting + greedy — scheduling and dispatch
  • Meeting Rooms II — Heap or greedy — resource allocation, minimum conference rooms

Solid middle problems (frequently reported)

  • Word Search — Backtracking — DFS on a character matrix
  • Spiral Matrix — Matrix traversal — tests grid iteration discipline
  • Serialize & Deserialize Binary Tree — Tree + encoding — tests tree fluency and edge-case handling
  • Kth Smallest Element in BST — In-order traversal — tests BST fundamentals; senior follow-up pushes to O(1) space (Morris traversal)
  • Evaluate Division — Graph + DFS/BFS — weighted graph, ratio propagation
  • Longest Substring Without Repeating Characters — Sliding window — classic two-pointer
  • Longest Subarray With Absolute Diff ≤ Limit — Sliding window + monotonic deque — harder variant
  • Product of Array Except Self — Prefix/suffix — no-division constraint
  • Container With Most Water — Two pointers — greedy reasoning
  • Two Sum — HashMap — appears in OA warm-up rounds
  • Squares of a Sorted Array — Two pointers — OA-level
  • Random Pick with Weight — Prefix sum + binary search — probability and sampling
  • Construct Quad Tree — Divide and conquer — spatial indexing, directly relevant to Uber's maps infrastructure

Senior / hard tier problems (L5+ onsite, specialization rounds)

These are drawn from specific reported Uber loops:

  • Matrix shortest path with 0/1 cost — BFS / 0-1 BFS / Dijkstra variant — reported in an L5A onsite loop
  • Next Greater Palindrome — String + math — reported in the same L5A loop
  • Expiry Counter (machine coding) — Design — implement a counter that automatically expires entries after a TTL; reported in L5A loop
  • Heatmap system design (machine coding variant) — Design + streaming — one candidate's loop involved a 500K TPS input stream with a Kafka → Flink → Redis → Postgres stack
  • BST traversal with O(1) space follow-up — Morris traversal — reported in an onsite experience where the interviewer expected this specific technique
  • Evaluate Division hard variant — Weighted graph — deeper follow-up on the standard problem, testing cycle handling and negative-weight edges

That is 30 problems across three tiers. The top-tier and solid-middle lists cover the patterns you will see in OA and phone screens. The senior tier covers what L5+ candidates face in specialization and machine coding rounds.

How to prepare for Uber LeetCode interviews

Fresher prep path (0–3 years experience)

Work through the top-tier and solid-middle lists above. Aim for 150–200 total problems solved across all pattern families. One candidate who cleared an Uber senior loop reported solving 200+ LeetCode problems and completing roughly 70% of a top-150 list — and that was for a senior role. For a fresher, the same pattern coverage at medium difficulty is the target.

Write clean, readable code. Not just correct — readable. Uber interviewers have flagged this explicitly. Use clear variable names, handle edge cases, and practice explaining your reasoning out loud as you code.

Time yourself. Uber's OA is a real round with a real clock. If you only practice untimed, the OA will feel harder than it should.

Experienced / senior prep path (L5+)

Add machine coding problems to your rotation. One L5A candidate prepped 7–8 common Uber machine coding patterns before the loop. These are not coding puzzles — they are small system components you build from scratch (expiry counters, hit counters, LRU variants).

Practice system design with real numbers. "Design a heatmap service" is not enough — you need to say "500K events per second ingest, Kafka for buffering, Flink for windowed aggregation, Redis for hot reads, Postgres for cold storage." Uber's design rounds expect you to reason about throughput, storage, and latency with concrete figures.

Prepare a detailed project deep-dive for the TLM / retrospective round. This is not behavioral fluff — it is a technical interrogation of a project you led. Know the architecture, the tradeoffs you made, and what you would change.

Run full mock loops, not just isolated problem sets. The gap between solving a problem in your IDE and performing under live interview pressure is real. Verve AI's Interview Copilot can run a realistic Uber coding mock with real-time feedback on your explanation, code walkthrough, and edge-case handling — so you practice the full loop, not just the problem. Try it free

The mock interview gap

Most candidates grind problems but skip full mocks. Solving 200 problems and then freezing in a live round is a common failure mode. The fix is reps under realistic conditions — timed, with someone (or something) listening, where you have to explain your thinking while you code.

Common mistakes that cost candidates the offer

  • Submitting code that compiles but fails edge cases. Uber expects runnable, tested code. An off-by-one error on a boundary condition can cost you the round.
  • Skipping the "why" explanation. Interviewers evaluate reasoning, not just output. If you jump straight to the optimal solution without explaining why brute force is too slow, you lose credit for the thinking.
  • Treating the onsite as easier than the OA. The onsite goes deeper on the same patterns. The OA filters; the onsite evaluates.
  • Ignoring code readability. Real Uber loop feedback has explicitly flagged this. Clean code is not optional.
  • Under-preparing system design scope. Design feedback from reported loops said complexity and scope were below expectations, even when the candidate's pro/con discussion was strong. More API detail, more concrete numbers.
  • For seniors: not preparing a machine coding problem set. Machine coding is its own round at Uber, not a variant of the standard coding round. It requires a different prep approach — building working components under time pressure, not solving algorithmic puzzles.

Wrapping up

The list above covers the patterns. Uber's bar is high, but it is predictable — the question set is not random, and the four pattern families account for the vast majority of what you will see. Study by pattern, not by problem count. Practice explaining your reasoning out loud. Run full mocks under timed conditions.

The gap between knowing the pattern and performing under pressure is reps. Verve AI's Interview Copilot gives you those reps with real-time feedback — try it free and see whether your explanations hold up when someone is actually listening.

VA

Verve AI

Archive