Uber Coding Interview Questions
20 Uber coding interview problems with full optimal solutions — 3 easy, 8 medium, 9 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Uber interviewer values, and a FAQ section.
- #1easyfoundational
1. Two Sum
Two Sum is Uber's go-to phone-screen warm-up: given an integer array and a target, return the indices of the two numbers that sum to it. Uber's bar is that you state the brute-force complexity before reaching for the hash map.
3 free resourcesSolve → - #3mediumfrequently asked
3. Longest Substring Without Repeating Characters
Find the length of the longest substring of s with no repeating characters. Uber asks this as a sliding-window primer to see if you reach for a left/right pointer plus a hash set instead of regenerating substrings.
3 free resourcesSolve → - #4hardless common
4. Median of Two Sorted Arrays
Given two sorted arrays nums1 and nums2, return the median of the combined sorted array in O(log(min(m, n))). Uber asks this to test whether you can narrow from O(m+n) merge to a binary-search partition argument.
3 free resourcesSolve → - #10hardless common
10. Regular Expression Matching
Implement regex matching with '.' (any single char) and '*' (zero or more of the previous). Uber asks this to test 2-D DP fluency: are you comfortable writing the recurrence, then memoizing it bottom-up?
3 free resourcesSolve → - #20easyfoundational
20. Valid Parentheses
Given a string of brackets '()[]{}', determine if every opener has a matching closer in the right order. Uber asks this to test stack fluency and whether you reach for the open->close map without prompting.
3 free resourcesSolve → - #23hardfrequently asked
23. Merge k Sorted Lists
Merge k sorted linked lists into one sorted list. Uber asks this to test whether you reach for the min-heap (or divide-and-conquer pairwise merge) and can articulate why N log k beats N log N.
3 free resourcesSolve → - #42hardfrequently asked
42. Trapping Rain Water
Given an elevation map of bar heights, compute how much water can be trapped after rain. Uber asks this to test whether you reach for the two-pointer O(1)-space solution after seeing the prefix-max O(n)-space one.
3 free resourcesSolve → - #53mediumfrequently asked
53. Maximum Subarray
Find the contiguous subarray with the largest sum (Kadane's algorithm). Uber asks this to test whether you can derive the linear recurrence — 'extend or restart' — without resorting to O(n^2) brute force.
3 free resourcesSolve → - #76hardfrequently asked
76. Minimum Window Substring
Find the smallest substring of s that contains every char of t (with multiplicities). Uber asks this as the canonical 'two-pointer plus need/have' sliding-window template — they want to see the formed-count trick.
3 free resourcesSolve → - #127hardfrequently asked
127. Word Ladder
Given beginWord, endWord, and a word list, find the length of the shortest transformation sequence where each step changes one letter and lands in the list. Uber asks this to test BFS-on-implicit-graphs plus the wildcard-bucket optimization.
3 free resourcesSolve → - #146mediumcompany favorite
146. LRU Cache
Design an LRU (Least Recently Used) cache supporting get and put in O(1). Uber asks this to test whether you can combine a hash map with a doubly linked list and explain why neither structure alone suffices.
3 free resourcesSolve → - #207mediumfrequently asked
207. Course Schedule
Given courses and prerequisites, determine if you can finish all courses (is the prerequisite graph a DAG?). Uber asks this to test whether you reach for Kahn's BFS topological sort or DFS cycle detection.
3 free resourcesSolve → - #210mediumfrequently asked
210. Course Schedule II
Same as Course Schedule but return one valid order to take all courses, or an empty array if impossible. Uber asks this to test topological sort fluency — return the order itself, not just the boolean.
3 free resourcesSolve → - #212hardless common
212. Word Search II
Given an m x n board of letters and a list of words, return all words that can be formed by adjacent cells (no reuse). Uber asks this to test trie + backtracking — running word-by-word DFS is too slow.
3 free resourcesSolve → - #218hardless common
218. The Skyline Problem
Given buildings as (left, right, height) triples, return the skyline outline as a list of key points. Uber asks this to test sweep-line + max-heap (or divide-and-conquer like merge-sort).
3 free resourcesSolve → - #359easyfrequently asked
359. Logger Rate Limiter
Design a logger that accepts messages once per 10 seconds — the LeetCode anchor for 'design a rate limiter' interview rounds. Uber asks this to test hash-map state, monotonic timestamps, and how you'd extend to per-key sliding windows.
3 free resourcesSolve → - #399mediumfrequently asked
399. Evaluate Division
Given a/b = k pairs, evaluate query x/y. Uber asks this to test whether you model it as a weighted graph and BFS/DFS the path, or as Union-Find with ratio compression — both are clean answers.
3 free resourcesSolve → - #528mediumfrequently asked
528. Random Pick With Weight
Given a positive-integer weights array, implement pickIndex() that returns i with probability proportional to w[i]. Uber asks this to test prefix sum + binary search and the uniform-on-[0,total) framing.
3 free resourcesSolve → - #721mediumfrequently asked
721. Accounts Merge
Given a list of accounts, each with a name and emails, merge accounts that share any email. Uber asks this to test Union-Find on email -> account mapping (or DFS on the implicit graph).
3 free resourcesSolve → - #1293hardless common
1293. Shortest Path in a Grid with Obstacles Elimination
Given a 0/1 grid where 1s are obstacles and you can eliminate up to k of them, return the shortest path from top-left to bottom-right. Uber asks this to test BFS with a 3D state (row, col, remaining eliminations).
3 free resourcesSolve →
Related interview-prep guides
HackerRank Tech Interview Guide 2026: What It Tests, How It Tracks You, and the Modern Setup
HackerRank is still the volume leader in first-round technical screens for 2026 tech hiring. A browser-sandboxed coding environment that logs every keystroke, paste event, and tab-focus change inside its own tab. This guide covers what it tests, the boundary of what it can and cannot detect, and how a modern desktop setup pairs with a HackerRank session without leaking into the screen-share.
CodeSignal GCA for Tech Interviews in 2026: The Complete Guide
The CodeSignal General Coding Assessment is a 70-minute, four-task timed test scored on a 600 to 850 scale, used as a filter by Goldman Sachs, Capital One, Robinhood, Brex, and a growing list of tech and finance employers. This guide breaks down what it tests, how it scores, what it tracks during your session, and how a modern desktop setup pairs with it without showing up in proctored recordings.
CoderPad Live Coding Interview Guide (2026): What the Pad Tracks and How to Walk Through It Cleanly
CoderPad is the default live-coding environment for human-led technical interviews in 2026. Used by YC startups, FAANG-tier teams, and most of the tech mid-market. The pad records every keystroke, every paste event, every language switch, and offers an interviewer scrub-back feature most candidates never realize exists. This is what CoderPad tracks, how the live session compares to async assessments, and how a modern desktop AI setup pairs with it without showing up in the screen-share.