Skip to content

Uber — DSA Questions

108 problems confirmed in interviews | 423 total tagged

Problem titles link to LeetCode. Interview mention counts are derived from our analysis of public discussion posts.

Priority List (confirmed in interviews)

# Problem Difficulty Tags Seen LC Editorial Video
1 Bus Routes Hard Graph 12x LC
2 Longest Continuous Subarray With Absolute Diff Less Tha Medium Array / Two Pointers 6x LC
3 Course Schedule II Medium Graph 5x LC
4 Alien Dictionary Hard Graph 4x LC
5 LRU Cache Medium HashMap / Design 4x LC
6 My Calendar I Medium Intervals 4x LC
7 Merge Intervals Medium Array, Sorting 4x LC
8 Reconstruct Itinerary Hard Array, String, Depth-First Search 4x LC
9 Number of Islands II Hard Graph 3x LC
10 Number of Islands Medium Graph 3x LC
11 Find the Closest Palindrome Hard Math, String 3x LC
12 Word Search II Hard Array, String, Backtracking 3x LC
13 Find Median from Data Stream Hard Heap / PQ 3x LC
14 Task Scheduler Medium Heap / PQ 3x LC
15 First Unique Number Medium HashMap / Design 2x LC
16 Insert Delete GetRandom O(1) Medium HashMap / Design 2x LC
17 Cherry Pickup Hard DP 2x LC
18 Making A Large Island Hard Graph 2x LC
19 Course Schedule Medium Graph 2x LC
20 Evaluate Division Medium Graph 2x LC
21 Group Anagrams Medium Array, Hash Table, String 2x LC
22 Decode Ways Medium DP 2x LC
23 Cheapest Flights Within K Stops Medium Graph 2x LC
24 Dungeon Game Hard DP 2x LC
25 Rotting Oranges Medium Graph 2x LC
26 Minimum Path Sum Medium DP 2x LC
27 Longest Repeating Character Replacement Medium Sliding Window 2x LC
28 Interval List Intersections Medium Array, Two Pointers, Sweep Line 2x LC
29 Maximum Points You Can Obtain from Cards Medium Other 2x LC
30 Furthest Building You Can Reach Medium Array, Greedy, Heap (Priority Queue) 2x LC
31 Merge Sorted Array ? Other 2x LC
32 Design Hit Counter Medium HashMap / Design 1x LC
33 Squares of a Sorted Array Easy Other 1x LC
34 Minimum Edge Reversals So Every Node Is Reachable Hard Other 1x LC
35 Word Search Medium Backtracking 1x LC
36 Text Justification Hard Array, String, Simulation 1x LC
37 Best Time to Buy and Sell Stock Easy Other 1x LC
38 Random Pick with Weight Medium Array, Math, Binary Search 1x LC
39 Split Array Largest Sum Hard Binary Search 1x LC
40 Rotating the Box Medium Other 1x LC
41 Count Primes Medium Math 1x LC
42 Minimum Jumps to Reach End via Prime Teleportation Medium Other 1x LC
43 Maximum Profit in Job Scheduling Hard DP 1x LC
44 Water and Jug Problem Medium Other 1x LC
45 String to Integer (atoi) Medium String 1x LC
46 Valid Palindrome Easy String 1x LC
47 Word Break II Hard Array, Hash Table, String 1x LC
48 Walls and Gates Medium Other 1x LC
49 Optimal Account Balancing Hard Array, Dynamic Programming, Backtracking 1x LC
50 Valid Parentheses Easy Stack / Queue 1x LC
51 Find First and Last Position of Element in Sorted Array Medium Binary Search 1x LC
52 Trapping Rain Water Hard Array / Two Pointers 1x LC
53 Move Zeroes Easy Other 1x LC
54 Smallest String With Swaps Medium Other 1x LC
55 Longest Path With Different Adjacent Characters Hard Other 1x LC
56 Remove Duplicates from Sorted Array Easy Array / Two Pointers 1x LC
57 Remove Element Easy Other 1x LC
58 Climbing Stairs Easy DP 1x LC
59 Majority Element Easy Array, Hash Table, Divide and Conquer 1x LC
60 H-Index Medium Array, Sorting, Counting Sort 1x LC
61 Minimum Number of Taps to Open to Water a Garden Hard Array, Dynamic Programming, Greedy 1x LC
62 Task Scheduler II Medium Heap / PQ 1x LC
63 Paint House Medium Array, Dynamic Programming 1x LC
64 Maximum Width Ramp Medium Other 1x LC
65 Shortest Path in a Grid with Obstacles Elimination Hard Tree 1x LC
66 2 Keys Keyboard Medium Other 1x LC
67 Maximum Number of Events That Can Be Attended Medium Other 1x LC
68 Video Stitching ? Other 1x LC
69 Minimum Insertions To Balance A Parentheses String ? Other 1x LC
70 Longest Happy String ? Other 1x LC
71 Remove Invalid Parentheses Hard String, Backtracking, Breadth-First Search 1x LC
72 Find Building Where Alice And Bob Can Meet ? Other 1x LC
73 Range Module Hard Design, Segment Tree, Ordered Set 1x LC
74 Largest Component Size by Common Factor Hard Array, Hash Table, Math 1x LC
75 Smallest Value After Replacing With Sum of Prime Factor Medium Math, Simulation, Number Theory 1x LC
76 Rotate Array ? Other 1x LC
77 Jump Game ? Other 1x LC
78 Find the Index of the First Occurrence in a String Easy Two Pointers, String, String Matching 1x LC
79 Valid Number ? Other 1x LC
80 Unique Paths Ii ? Other 1x LC

Graph (19 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Bus Routes Hard 12x LC
2 Course Schedule II Medium 5x LC
3 Alien Dictionary Hard 4x LC
4 Reconstruct Itinerary Hard Array, String, Depth-First Search 4x LC
5 Number of Islands II Hard 3x LC
6 Number of Islands Medium 3x LC
7 Making A Large Island Hard 2x LC
8 Course Schedule Medium 2x LC
9 Evaluate Division Medium 2x LC
10 Cheapest Flights Within K Stops Medium 2x LC
11 Rotting Oranges Medium 2x LC
12 Verifying an Alien Dictionary Easy LC
13 Clone Graph Medium LC
14 Course Schedule IV Medium LC
15 Remove Max Number of Edges to Keep Graph Fully Traversa Hard LC
16 Pacific Atlantic Water Flow Medium LC
17 Is Graph Bipartite? Medium Depth-First Search, Breadth-First Search, Union-Find LC
18 Max Area of Island Medium LC
19 Graph Connectivity With Threshold Hard Array, Math, Union-Find LC

DP (17 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Cherry Pickup Hard 2x LC
2 Decode Ways Medium 2x LC
3 Dungeon Game Hard 2x LC
4 Minimum Path Sum Medium 2x LC
5 Maximum Profit in Job Scheduling Hard 1x LC
6 Word Break II Hard Array, Hash Table, String 1x LC
7 Climbing Stairs Easy 1x LC
8 House Robber III Medium Dynamic Programming, Tree, Depth-First Search LC
9 Word Break Medium LC
10 Regular Expression Matching Hard String, Dynamic Programming, Recursion LC
11 One Edit Distance Medium LC
12 House Robber Medium LC
13 Coin Change Medium LC
14 Longest Increasing Path in a Matrix Hard LC
15 Longest Increasing Subsequence Medium LC
16 House Robber II Medium LC
17 Cherry Pickup II Hard LC

Tree (33 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Shortest Path in a Grid with Obstacles Elimination Hard 1x LC
2 Count Paths That Can Form a Palindrome in a Tree Hard Hash Table, Bit Manipulation, Tree LC
3 Construct Quad Tree Medium LC
4 Kth Smallest Element in a BST Medium LC
5 Minimum Window Substring Hard LC
6 Maximum Depth of Binary Tree Easy LC
7 Serialize and Deserialize Binary Tree Hard String, Tree, Depth-First Search LC
8 Boundary of Binary Tree Medium LC
9 Binary Tree Longest Consecutive Sequence II Medium LC
10 Delete Node in a BST Medium Tree, Binary Search Tree, Binary Tree LC
11 Binary Tree Right Side View Medium LC
12 Implement Trie (Prefix Tree) Medium LC
13 Number of Nodes in the Sub-Tree With the Same Label Medium Hash Table, Tree, Depth-First Search LC
14 Number Of Ways To Reconstruct A Tree Hard Array, Hash Table, Tree LC
15 Number of Strings That Appear as Substrings in Word Easy LC
16 Create Binary Tree From Descriptions Medium LC
17 Longest Substring Without Repeating Characters Medium LC
18 Binary Tree Maximum Path Sum Hard LC
19 Collect Coins in a Tree Hard LC
20 Most Profitable Path in a Tree Medium LC
21 Brightest Position on Street Medium Array, Sorting, Prefix Sum LC
22 Longest Palindromic Substring Medium LC
23 Validate Binary Search Tree Medium Tree, Depth-First Search, Binary Search Tree LC
24 Maximum Width of Binary Tree Medium LC
25 Complete Binary Tree Inserter Medium LC
26 Amount of Time for Binary Tree to Be Infected Medium LC
27 Construct Binary Tree from Preorder and Inorder Travers Medium LC
28 Sum of Distances in Tree Hard LC
29 Number of Distinct Substrings in a String Medium LC
30 Binary Search Tree Iterator Medium LC
31 Find Critical and Pseudo-Critical Edges in Minimum Span Hard LC
32 Closest Binary Search Tree Value Easy Binary Search, Tree, Depth-First Search LC
33 Count Binary Substrings Easy LC

Array / Two Pointers (20 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Longest Continuous Subarray With Absolute Diff Less Tha Medium 6x LC
2 Trapping Rain Water Hard 1x LC
3 Remove Duplicates from Sorted Array Easy 1x LC
4 Product of Array Except Self Medium LC
5 Two Sum Easy LC
6 Count Subarrays With Fixed Bounds Hard LC
7 Maximum Subarray Min-Product Medium LC
8 K Divisible Elements Subarrays Medium LC
9 Container With Most Water Medium LC
10 Maximum Subarray Medium LC
11 Subarrays with K Different Integers Hard LC
12 Count the Number of Good Subarrays Medium Array, Hash Table, Sliding Window LC
13 Length of Longest Subarray With at Most K Frequency Medium Array, Hash Table, Sliding Window LC
14 Subarray Sums Divisible by K Medium LC
15 Remove Duplicates from Sorted Array II Medium LC
16 Subarray Sum Equals K Medium LC
17 Continuous Subarrays Medium Array, Queue, Sliding Window LC
18 Number of Subarrays That Match a Pattern I Medium LC
19 Number of Subarrays with Bounded Maximum Medium LC
20 Maximum Average Subarray I Easy LC

Sliding Window (2 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Longest Repeating Character Replacement Medium 2x LC
2 Sliding Window Maximum Hard Array, Queue, Sliding Window LC

Intervals (9 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 My Calendar I Medium 4x LC
2 Merge Intervals Medium Array, Sorting 4x LC
3 Interval List Intersections Medium Array, Two Pointers, Sweep Line 2x LC
4 Meeting Rooms II Medium LC
5 Meeting Rooms III Hard LC
6 Insert Interval Medium LC
7 Meeting Rooms Easy Array, Sorting LC
8 Count Integers in Intervals Hard Design, Segment Tree, Ordered Set LC
9 My Calendar II Medium LC

Heap / PQ (7 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Find Median from Data Stream Hard 3x LC
2 Task Scheduler Medium 3x LC
3 Task Scheduler II Medium 1x LC
4 Top K Frequent Words Medium LC
5 Top K Frequent Elements Medium LC
6 Merge k Sorted Lists Hard LC
7 Kth Largest Element in an Array Medium LC

Stack / Queue (10 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Valid Parentheses Easy 1x LC
2 Basic Calculator II Medium LC
3 Basic Calculator Hard LC
4 Generate Parentheses Medium String, Dynamic Programming, Backtracking LC
5 Largest Rectangle in Histogram Hard LC
6 Min Stack Medium LC
7 Asteroid Collision Medium LC
8 Longest Valid Parentheses Hard String, Dynamic Programming, Stack LC
9 Valid Parenthesis String Medium LC
10 Maximum Frequency Stack Hard LC

HashMap / Design (7 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 LRU Cache Medium 4x LC
2 First Unique Number Medium 2x LC
3 Insert Delete GetRandom O(1) Medium 2x LC
4 Group Anagrams Medium Array, Hash Table, String 2x LC
5 Design Hit Counter Medium 1x LC
6 Insert Delete GetRandom O(1) - Duplicates allowed Hard LC
7 LFU Cache Hard LC

Binary Search (5 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Split Array Largest Sum Hard 1x LC
2 Find First and Last Position of Element in Sorted Array Medium 1x LC
3 Search in Rotated Sorted Array Medium LC
4 Sqrt(x) Easy Math, Binary Search LC
5 Search in Rotated Sorted Array II Medium Array, Binary Search LC

String (13 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Find the Closest Palindrome Hard Math, String 3x LC
2 Text Justification Hard Array, String, Simulation 1x LC
3 String to Integer (atoi) Medium 1x LC
4 Valid Palindrome Easy 1x LC
5 Valid Anagram Easy LC
6 Shortest Palindrome Hard LC
7 Palindrome Permutation Easy LC
8 Longest Palindromic Subsequence Medium String, Dynamic Programming LC
9 Construct K Palindrome Strings Medium LC
10 Palindrome Number Easy LC
11 Count Different Palindromic Subsequences Hard String, Dynamic Programming LC
12 Count Palindromic Subsequences Hard LC
13 Valid Palindrome II Easy Two Pointers, String, Greedy LC

Backtracking (11 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Word Search II Hard Array, String, Backtracking 3x LC
2 Word Search Medium 1x LC
3 Letter Combinations of a Phone Number Medium Hash Table, String, Backtracking LC
4 Valid Sudoku Medium LC
5 Sudoku Solver Hard LC
6 Next Permutation Medium Array, Two Pointers LC
7 Combination Sum Medium LC
8 Subsets Medium Array, Backtracking, Bit Manipulation LC
9 Factor Combinations Medium Backtracking LC
10 Permutations Medium LC
11 Largest Divisible Subset Medium LC

Matrix / Grid (8 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Spiral Matrix Medium LC
2 Rotate Image Medium LC
3 Match Alphanumerical Pattern in Matrix I Medium LC
4 Set Matrix Zeroes Medium LC
5 Search a 2D Matrix II Medium Array, Binary Search, Divide and Conquer LC
6 01 Matrix Medium LC
7 Spiral Matrix III Medium Array, Matrix, Simulation LC
8 Shortest Path in Binary Matrix Medium LC

Linked List (6 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Swap Nodes in Pairs Medium LC
2 Reverse Linked List Easy LC
3 Remove Zero Sum Consecutive Nodes from Linked List Medium LC
4 Add Two Numbers Medium LC
5 Linked List Cycle Easy Hash Table, Linked List, Two Pointers LC
6 Linked List Components Medium LC

Math (4 problems)

# Problem Difficulty Tags Seen LC Editorial Video
1 Count Primes Medium 1x LC
2 Minimum Operations to Reduce an Integer to 0 Medium Dynamic Programming, Greedy, Bit Manipulation LC
3 Roman to Integer Easy Hash Table, Math, String LC
4 Reverse Integer Medium LC