How often are these problems asked?
Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Uber interviews.
Very Likely
75-100%
Likely
50-74%
Sometimes
25-49%
Rare
0-24%
Problem database last updated: June 20, 2025
100 problems · 24 Easy, 57 Medium, 19 Hard · Ranked #9 of 458
24 Easy
24% · avg 23%
57 Medium
57% · avg 59%
19 Hard
19% · avg 18%
Based on 100 reported problems, Uber interviews are in line with industry averages - 19% Hard vs 18% overall. The majority (57%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.
Compared to the industry average, Uber puts unusual emphasis on binary-search-tree (3% of problems, 2.7x the industry average), backtracking (12% of problems, 2.3x the industry average), binary-tree (10% of problems, 2x the industry average). If you're short on time, these are the categories to double down on.
The most common topics are array (51%), string (29%), dynamic-programming (26%), hash-table (17%). Problems below are sorted by frequency, the ones at the top are asked most often.
| Problem | Difficulty | Frequency | Topics | |
|---|---|---|---|---|
Two Sum Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target. | Easy | Very Likely | arrayhash-map | Solve |
Best Time to Buy and Sell Stock You are given an array prices where prices[i] is the price of a given stock on the ith day. | Easy | Very Likely | arraydynamic-programming | Solve |
Word Search Given an m x n grid of characters board and a string word, return true if word exists in the grid. | Medium | Likely | arraystringbacktracking | Solve |
Text Justification Given an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justifie... | Hard | Likely | arraystringsimulation | Solve |
Spiral Matrix Given an m x n matrix, return all elements of the matrix in spiral order. | Medium | Likely | arraymatrixsimulation | Solve |
Valid Sudoku Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: | Medium | Likely | arrayhash-tablematrix | Solve |
Group Anagrams Given an array of strings strs, group the anagrams together. You can return the answer in any order. | Medium | Likely | arrayhash-tablestring | Solve |
Roman to Integer Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. | Easy | Likely | hash-tablemathstring | Solve |
Letter Combinations of a Phone Number Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. | Medium | Likely | hash-tablestringbacktracking | Solve |
Generate Parentheses Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. | Medium | Likely | stringdynamic-programmingbacktracking | Solve |
Minimum Window Substring Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is inc... | Hard | Likely | hash-tablestringsliding-window | Solve |
Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a sing... | Medium | Likely | linked-listmathrecursion | Solve |
Merge Sorted Array You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and num... | Easy | Likely | arraytwo-pointerssorting | Solve |
Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. | Easy | Likely | arraystringtrie | Solve |
Word Break Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words. | Medium | Likely | arrayhash-tablestring | Solve |
Trapping Rain Water Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. | Hard | Likely | arraytwo-pointersdynamic-programming | Solve |
Valid Palindrome A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forwa... | Easy | Likely | two-pointersstring | Solve |
Remove Element Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number... | Easy | Likely | arraytwo-pointers | Solve |
Rotate Image You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). | Medium | Likely | arraymathmatrix | Solve |
Search in Rotated Sorted Array There is an integer array nums sorted in ascending order (with distinct values). | Medium | Likely | arraybinary-search | Solve |
Decode Ways You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping: | Medium | Likely | stringdynamic-programming | Solve |
3Sum Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. | Medium | Likely | arraytwo-pointerssorting | Solve |
Next Permutation A permutation of an array of integers is an arrangement of its members into a sequence or linear order. | Medium | Likely | arraytwo-pointers | Solve |
Largest Rectangle in Histogram Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the his... | Hard | Likely | arraystackmonotonic-stack | Solve |
Maximum Depth of Binary Tree Given the root of a binary tree, return its maximum depth. | Easy | Likely | treedepth-first-searchbreadth-first-search | Solve |
Sqrt(x) Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer should be non-negative as well. | Easy | Likely | mathbinary-search | Solve |
Valid Parentheses Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. | Easy | Likely | stringstack | Solve |
Median of Two Sorted Arrays Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. | Hard | Likely | arraybinary-searchdivide-and-conquer | Solve |
Merge Two Sorted Lists You are given the heads of two sorted linked lists list1 and list2. | Easy | Likely | linked-listrecursion | Solve |
Regular Expression Matching Given an input string s and a pattern p, implement regular expression matching with support for '.' and '' where: | Hard | Likely | stringdynamic-programmingrecursion | Solve |
Longest Consecutive Sequence Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. | Medium | Likely | arrayhash-tableunion-find | Solve |
Merge k Sorted Lists You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. | Hard | Likely | linked-listdivide-and-conquerheap-priority-queue | Solve |
Reverse Integer Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1... | Medium | Likely | math | Solve |
Word Break II Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possi... | Hard | Likely | arrayhash-tablestring | Solve |
Maximum Subarray Given an integer array nums, find the subarray with the largest sum, and return its sum. | Medium | Likely | arraydivide-and-conquerdynamic-programming | Solve |
Subsets Given an integer array nums of unique elements, return all possible subsets (the power set). | Medium | Likely | arraybacktrackingbit-manipulation | Solve |
Sudoku Solver Write a program to solve a Sudoku puzzle by filling the empty cells. | Hard | Likely | arrayhash-tablebacktracking | Solve |
Longest Palindromic Substring Given a string s, return the longest palindromic substring in s. | Medium | Likely | two-pointersstringdynamic-programming | Solve |
Merge Intervals Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove... | Medium | Likely | arraysorting | Solve |
Remove Duplicates from Sorted Array Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order o... | Easy | Likely | arraytwo-pointers | Solve |
Find First and Last Position of Element in Sorted Array Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. | Medium | Likely | arraybinary-search | Solve |
Find the Index of the First Occurrence in a String Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. | Easy | Likely | two-pointersstringstring-matching | Solve |
String to Integer (atoi) Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer. | Medium | Likely | string | Solve |
Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i.e., only... | Medium | Likely | linked-listrecursion | Solve |
Combination Sum Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum... | Medium | Likely | arraybacktracking | Solve |
Clone Graph Given a reference of a node in a connected undirected graph. | Medium | Sometimes | hash-tabledepth-first-searchbreadth-first-search | Solve |
Longest Substring Without Repeating Characters Given a string s, find the length of the longest substring without duplicate characters. | Medium | Sometimes | hash-tablestringsliding-window | Solve |
Jump Game II You are given a 0-indexed array of integers nums of length n. You are initially positioned at index 0. | Medium | Sometimes | arraydynamic-programminggreedy | Solve |
Copy List with Random Pointer A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null. | Medium | Sometimes | hash-tablelinked-list | Solve |
Container With Most Water You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). | Medium | Sometimes | arraytwo-pointersgreedy | Solve |
Climbing Stairs You are climbing a staircase. It takes n steps to reach the top. | Easy | Sometimes | mathdynamic-programmingmemoization | Solve |
Palindrome Number Given an integer x, return true if x is a palindrome, and false otherwise. | Easy | Sometimes | math | Solve |
Jump Game You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length... | Medium | Sometimes | arraydynamic-programminggreedy | Solve |
Word Ladder A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that: | Hard | Sometimes | hash-tablestringbreadth-first-search | Solve |
Search Insert Position Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were ins... | Easy | Sometimes | arraybinary-search | Solve |
Insert Interval You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and interv... | Medium | Sometimes | array | Solve |
Plus One You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most sig... | Easy | Sometimes | arraymath | Solve |
Zigzag Conversion The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better... | Medium | Sometimes | string | Solve |
Longest Valid Parentheses Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring. | Hard | Sometimes | stringdynamic-programmingstack | Solve |
Candy There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. | Hard | Sometimes | arraygreedy | Solve |
Best Time to Buy and Sell Stock II You are given an integer array prices where prices[i] is the price of a given stock on the ith day. | Medium | Sometimes | arraydynamic-programminggreedy | Solve |
Binary Tree Level Order Traversal Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). | Medium | Sometimes | treebreadth-first-searchbinary-tree | Solve |
Set Matrix Zeroes Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's. | Medium | Sometimes | arrayhash-tablematrix | Solve |
Length of Last Word Given a string s consisting of words and spaces, return the length of the last word in the string. | Easy | Sometimes | string | Solve |
Minimum Path Sum Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. | Medium | Sometimes | arraydynamic-programmingmatrix | Solve |
Divide Two Integers Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator. | Medium | Sometimes | mathbit-manipulation | Solve |
First Missing Positive Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums. | Hard | Sometimes | arrayhash-table | Solve |
Pascal's Triangle Given an integer numRows, return the first numRows of Pascal's triangle. | Easy | Sometimes | arraydynamic-programming | Solve |
Linked List Cycle Given head, the head of a linked list, determine if the linked list has a cycle in it. | Easy | Sometimes | hash-tablelinked-listtwo-pointers | Solve |
Permutations Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. | Medium | Sometimes | arraybacktracking | Solve |
Combination Sum II Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to... | Medium | Sometimes | arraybacktracking | Solve |
Add Binary Given two binary strings a and b, return their sum as a binary string. | Easy | Sometimes | mathstringbit-manipulation | Solve |
Binary Tree Maximum Path Sum A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequ... | Hard | Sometimes | dynamic-programmingtreedepth-first-search | Solve |
3Sum Closest Given an integer array nums of length n and an integer target, find three integers at distinct indices in nums such that the sum is closest to target. | Medium | Sometimes | arraytwo-pointerssorting | Solve |
Validate Binary Search Tree Given the root of a binary tree, determine if it is a valid binary search tree (BST). | Medium | Sometimes | treedepth-first-searchbinary-search-tree | Solve |
N-Queens The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. | Hard | Sometimes | arraybacktracking | Solve |
Search in Rotated Sorted Array II There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). | Medium | Sometimes | arraybinary-search | Solve |
4Sum Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: | Medium | Sometimes | arraytwo-pointerssorting | Solve |
Binary Tree Inorder Traversal Given the root of a binary tree, return the inorder traversal of its nodes' values. | Easy | Sometimes | stacktreedepth-first-search | Solve |
Flatten Binary Tree to Linked List Given the root of a binary tree, flatten the tree into a "linked list": | Medium | Sometimes | linked-liststacktree | Solve |
Interleaving String Given strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2. | Medium | Sometimes | stringdynamic-programming | Solve |
Sort Colors Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order... | Medium | Sometimes | arraytwo-pointerssorting | Solve |
Pow(x, n) Implement pow(x, n), which calculates x raised to the power n (i.e., xn). | Medium | Sometimes | mathrecursion | Solve |
Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. | Medium | Sometimes | stringdynamic-programmingbacktracking | Solve |
Distinct Subsequences Given two strings s and t, return the number of distinct subsequences of s which equals t. | Hard | Sometimes | stringdynamic-programming | Solve |
Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. | Easy | Sometimes | treedepth-first-searchbreadth-first-search | Solve |
Unique Paths There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner... | Medium | Sometimes | mathdynamic-programmingcombinatorics | Solve |
Unique Binary Search Trees II Given an integer n, return all the structurally unique BST's (binary search trees), which has exactly n nodes of unique values from 1 to n. Return the answer in... | Medium | Rare | dynamic-programmingbacktrackingtree | Solve |
Unique Paths II You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-r... | Medium | Rare | arraydynamic-programmingmatrix | Solve |
Spiral Matrix II Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. | Medium | Rare | arraymatrixsimulation | Solve |
Convert Sorted List to Binary Search Tree Given the head of a singly linked list where elements are sorted in ascending order, convert it to a height-balanced binary search tree. | Medium | Rare | linked-listdivide-and-conquertree | Solve |
Remove Nth Node From End of List Given the head of a linked list, remove the nth node from the end of the list and return its head. | Medium | Rare | linked-listtwo-pointers | Solve |
Maximal Rectangle Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. | Hard | Rare | arraydynamic-programmingstack | Solve |
Multiply Strings Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. | Medium | Rare | mathstringsimulation | Solve |
Wildcard Matching Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '' where: | Hard | Rare | stringdynamic-programminggreedy | Solve |
Balanced Binary Tree Given a binary tree, determine if it is height-balanced. | Easy | Rare | treedepth-first-searchbinary-tree | Solve |
Integer to Roman Seven different symbols represent Roman numerals with the following values: | Medium | Rare | hash-tablemathstring | Solve |
Best Time to Buy and Sell Stock III You are given an array prices where prices[i] is the price of a given stock on the ith day. | Hard | Rare | arraydynamic-programming | Solve |
Reverse Linked List II Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right,... | Medium | Rare | linked-list | Solve |
Remove Duplicates from Sorted Array II Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. The relative or... | Medium | Rare | arraytwo-pointers | Solve |
Two Sum
SolveGiven an array of integers nums and an integer target, return the indices of the two numbers that add up to target.
Best Time to Buy and Sell Stock
SolveYou are given an array prices where prices[i] is the price of a given stock on the ith day.
Word Search
SolveGiven an m x n grid of characters board and a string word, return true if word exists in the grid.
Text Justification
SolveGiven an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justifie...
Spiral Matrix
SolveGiven an m x n matrix, return all elements of the matrix in spiral order.
Valid Sudoku
SolveDetermine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:
Group Anagrams
SolveGiven an array of strings strs, group the anagrams together. You can return the answer in any order.
Roman to Integer
SolveRoman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Letter Combinations of a Phone Number
SolveGiven a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.
Generate Parentheses
SolveGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
Minimum Window Substring
SolveGiven two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is inc...
Add Two Numbers
SolveYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a sing...
Merge Sorted Array
SolveYou are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and num...
Longest Common Prefix
SolveWrite a function to find the longest common prefix string amongst an array of strings.
Word Break
SolveGiven a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.
Trapping Rain Water
SolveGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Valid Palindrome
SolveA phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forwa...
Remove Element
SolveGiven an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number...
Rotate Image
SolveYou are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
Search in Rotated Sorted Array
SolveThere is an integer array nums sorted in ascending order (with distinct values).
Decode Ways
SolveYou have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping:
3Sum
SolveGiven an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
Next Permutation
SolveA permutation of an array of integers is an arrangement of its members into a sequence or linear order.
Largest Rectangle in Histogram
SolveGiven an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the his...
Maximum Depth of Binary Tree
SolveGiven the root of a binary tree, return its maximum depth.
Sqrt(x)
SolveGiven a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer should be non-negative as well.
Valid Parentheses
SolveGiven a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
Median of Two Sorted Arrays
SolveGiven two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
Merge Two Sorted Lists
SolveYou are given the heads of two sorted linked lists list1 and list2.
Regular Expression Matching
SolveGiven an input string s and a pattern p, implement regular expression matching with support for '.' and '' where:
Longest Consecutive Sequence
SolveGiven an unsorted array of integers nums, return the length of the longest consecutive elements sequence.
Merge k Sorted Lists
SolveYou are given an array of k linked-lists lists, each linked-list is sorted in ascending order.
Reverse Integer
SolveGiven a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1...
Word Break II
SolveGiven a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possi...
Maximum Subarray
SolveGiven an integer array nums, find the subarray with the largest sum, and return its sum.
Subsets
SolveGiven an integer array nums of unique elements, return all possible subsets (the power set).
Sudoku Solver
SolveWrite a program to solve a Sudoku puzzle by filling the empty cells.
Longest Palindromic Substring
SolveGiven a string s, return the longest palindromic substring in s.
Merge Intervals
SolveGiven an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...
Remove Duplicates from Sorted Array
SolveGiven an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order o...
Find First and Last Position of Element in Sorted Array
SolveGiven an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value.
Find the Index of the First Occurrence in a String
SolveGiven two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
String to Integer (atoi)
SolveImplement the myAtoi(string s) function, which converts a string to a 32-bit signed integer.
Swap Nodes in Pairs
SolveGiven a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i.e., only...
Combination Sum
SolveGiven an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum...
Clone Graph
SolveGiven a reference of a node in a connected undirected graph.
Longest Substring Without Repeating Characters
SolveGiven a string s, find the length of the longest substring without duplicate characters.
Jump Game II
SolveYou are given a 0-indexed array of integers nums of length n. You are initially positioned at index 0.
Copy List with Random Pointer
SolveA linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null.
Container With Most Water
SolveYou are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).
Climbing Stairs
SolveYou are climbing a staircase. It takes n steps to reach the top.
Palindrome Number
SolveGiven an integer x, return true if x is a palindrome, and false otherwise.
Jump Game
SolveYou are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length...
Word Ladder
SolveA transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that:
Search Insert Position
SolveGiven a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were ins...
Insert Interval
SolveYou are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and interv...
Plus One
SolveYou are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most sig...
Zigzag Conversion
SolveThe string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better...
Longest Valid Parentheses
SolveGiven a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.
Candy
SolveThere are n children standing in a line. Each child is assigned a rating value given in the integer array ratings.
Best Time to Buy and Sell Stock II
SolveYou are given an integer array prices where prices[i] is the price of a given stock on the ith day.
Binary Tree Level Order Traversal
SolveGiven the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).
Set Matrix Zeroes
SolveGiven an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's.
Length of Last Word
SolveGiven a string s consisting of words and spaces, return the length of the last word in the string.
Minimum Path Sum
SolveGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path.
Divide Two Integers
SolveGiven two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator.
First Missing Positive
SolveGiven an unsorted integer array nums. Return the smallest positive integer that is not present in nums.
Pascal's Triangle
SolveGiven an integer numRows, return the first numRows of Pascal's triangle.
Linked List Cycle
SolveGiven head, the head of a linked list, determine if the linked list has a cycle in it.
Permutations
SolveGiven an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
Combination Sum II
SolveGiven a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to...
Add Binary
SolveGiven two binary strings a and b, return their sum as a binary string.
Binary Tree Maximum Path Sum
SolveA path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequ...
3Sum Closest
SolveGiven an integer array nums of length n and an integer target, find three integers at distinct indices in nums such that the sum is closest to target.
Validate Binary Search Tree
SolveGiven the root of a binary tree, determine if it is a valid binary search tree (BST).
N-Queens
SolveThe n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.
Search in Rotated Sorted Array II
SolveThere is an integer array nums sorted in non-decreasing order (not necessarily with distinct values).
4Sum
SolveGiven an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:
Binary Tree Inorder Traversal
SolveGiven the root of a binary tree, return the inorder traversal of its nodes' values.
Flatten Binary Tree to Linked List
SolveGiven the root of a binary tree, flatten the tree into a "linked list":
Interleaving String
SolveGiven strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2.
Sort Colors
SolveGiven an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order...
Pow(x, n)
SolveImplement pow(x, n), which calculates x raised to the power n (i.e., xn).
Palindrome Partitioning
SolveGiven a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
Distinct Subsequences
SolveGiven two strings s and t, return the number of distinct subsequences of s which equals t.
Minimum Depth of Binary Tree
SolveGiven a binary tree, find its minimum depth.
Unique Paths
SolveThere is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner...
Unique Binary Search Trees II
SolveGiven an integer n, return all the structurally unique BST's (binary search trees), which has exactly n nodes of unique values from 1 to n. Return the answer in...
Unique Paths II
SolveYou are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-r...
Spiral Matrix II
SolveGiven a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order.
Convert Sorted List to Binary Search Tree
SolveGiven the head of a singly linked list where elements are sorted in ascending order, convert it to a height-balanced binary search tree.
Remove Nth Node From End of List
SolveGiven the head of a linked list, remove the nth node from the end of the list and return its head.
Maximal Rectangle
SolveGiven a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.
Multiply Strings
SolveGiven two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.
Wildcard Matching
SolveGiven an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '' where:
Balanced Binary Tree
SolveGiven a binary tree, determine if it is height-balanced.
Integer to Roman
SolveSeven different symbols represent Roman numerals with the following values:
Best Time to Buy and Sell Stock III
SolveYou are given an array prices where prices[i] is the price of a given stock on the ith day.
Reverse Linked List II
SolveGiven the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right,...
Remove Duplicates from Sorted Array II
SolveGiven an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. The relative or...
Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Uber interviews.
Very Likely
75-100%
Likely
50-74%
Sometimes
25-49%
Rare
0-24%
Uber interviews focus heavily on array, string, dynamic-programming problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.
Beyond solving problems, practice explaining your approach. Uber interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.
Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.
Uber has been reported to ask 100 distinct coding problems. The most common topics are array, string, dynamic-programming. 24 are Easy difficulty, 57 are Medium, and 19 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.
Based on 100 reported problems, Uber interviews are in line with industry averages - 19% Hard vs 18% overall. 57% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.
Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, dynamic-programming. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.
Simulate a real Uber coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.
Simulate a Uber interview with AIarrow_forward