LeetCode Problems for Uber

LeetCode Problems for Uber

The recruiting process of uber is kind of different from other tech industries like Google or Facebook. In google, they will look for your approach rather than writing the exact code. However, in Uber, you might just have to write the exact code which you can compile. Their interview questions can be tricky and these are hard to find on the internet. Actually, it goes for most of the company. However, we’ve listed some of the popular LeetCode problems for Uber so that you can eventually find the answer while you practice these.

IDTitleAcceptanceDifficultyFrequency
427Construct Quad Tree61.4%Medium3.202577
291Word Pattern II43.4%Hard3.009099
529Minesweeper59.1%Medium2.815621
305Number of Islands II40.1%Hard2.787336
741Cherry Pickup33.9%Hard2.728198
757Set Intersection Size At Least Two40.1%Hard2.534720
332Reconstruct Itinerary36.7%Medium2.473063
341Flatten Nested List Iterator52.9%Medium2.457542
68Text Justification27.7%Hard2.456054
465Optimal Account Balancing46.9%Hard2.393782
146LRU Cache33.2%Medium2.233077
262Trips and Users32.7%Hard2.179117
56Merge Intervals39.3%Medium1.985639
267Palindrome Permutation II36.4%Medium1.964422
36Valid Sudoku48.7%Medium1.963804
655Print Binary Tree55.0%Medium1.914229
227Basic Calculator II36.9%Medium1.831507
42Trapping Rain Water48.9%Hard1.822881
200Number of Islands46.8%Medium1.809092
986Interval List Intersections67.3%Medium1.718931
297Serialize and Deserialize Binary Tree47.5%Hard1.660727
253Meeting Rooms II45.7%Medium1.630547
1Two Sum45.6%Easy1.625376
428Serialize and Deserialize N-ary Tree59.4%Hard1.619513
380Insert Delete GetRandom O(1)47.5%Medium1.558728
773Sliding Puzzle59.3%Hard1.500053
359Logger Rate Limiter70.8%Easy1.464289
772Basic Calculator III41.3%Hard1.324801
166Fraction to Recurring Decimal21.6%Medium1.306198
780Reaching Points29.4%Hard1.277920
239Sliding Window Maximum43.0%Hard1.232160
224Basic Calculator36.8%Hard1.204714
49Group Anagrams56.9%Medium1.190205
17Letter Combinations of a Phone Number46.8%Medium1.173526
212Word Search II34.9%Hard1.171264
642Design Search Autocomplete System44.7%Hard1.153902
361Bomb Enemy46.0%Medium1.153571
139Word Break40.1%Medium1.148960
286Walls and Gates54.5%Medium1.138563
591Tag Validator34.3%Hard1.133098
336Palindrome Pairs33.7%Hard1.108170
636Exclusive Time of Functions51.9%Medium1.070608
128Longest Consecutive Sequence45.1%Hard1.068770
381Insert Delete GetRandom O(1) – Duplicates allowed34.1%Hard1.026132
34Find First and Last Position of Element in Sorted Array36.2%Medium1.025636
365Water and Jug Problem30.6%Medium1.008746
269Alien Dictionary33.3%Hard0.991185
254Factor Combinations46.7%Medium0.990701
528Random Pick with Weight43.9%Medium0.973565
149Max Points on a Line16.9%Hard0.959374
10Regular Expression Matching26.8%Hard0.922832
76Minimum Window Substring34.6%Hard0.917009
67924 Game46.4%Hard0.863624
329Longest Increasing Path in a Matrix43.4%Hard0.854020
99Recover Binary Search Tree39.7%Hard0.839418
640Solve the Equation42.0%Medium0.838920
1135Connecting Cities With Minimum Cost57.5%Medium0.822437
22Generate Parentheses62.7%Medium0.816740
2Add Two Numbers33.9%Medium0.802917
173Binary Search Tree Iterator56.6%Medium0.800934
57Insert Interval33.5%Hard0.784728
126Word Ladder II22.1%Hard0.771057
32Longest Valid Parentheses28.4%Hard0.745526
251Flatten 2D Vector45.7%Medium0.740874
133Clone Graph34.8%Medium0.732595
535Encode and Decode TinyURL79.9%Medium0.728423
127Word Ladder29.6%Medium0.699871
4Median of Two Sorted Arrays29.6%Hard0.693342
273Integer to English Words27.1%Hard0.685368
244Shortest Word Distance II52.3%Medium0.678184
936Stamping The Sequence42.8%Hard0.673729
218The Skyline Problem34.6%Hard0.657018
54Spiral Matrix34.1%Medium0.628586
23Merge k Sorted Lists40.2%Hard0.585393
388Longest Absolute File Path41.8%Medium0.585022
37Sudoku Solver43.6%Hard0.574732
153Sum26.8%Medium0.561579
208Implement Trie (Prefix Tree)49.4%Medium0.554408
658Find K Closest Elements40.9%Medium0.535150
158Read N Characters Given Read4 II – Call multiple times33.8%Hard0.508965
20Valid Parentheses39.0%Easy0.486769
527Word Abbreviation54.3%Hard0.482851
91Decode Ways24.7%Medium0.469142
3Longest Substring Without Repeating Characters30.4%Medium0.464984
79Word Search35.6%Medium0.451219
668Kth Smallest Number in Multiplication Table45.6%Hard0.450690
85Maximal Rectangle37.7%Hard0.449235
353Design Snake Game34.2%Medium0.445725
221Maximal Square37.7%Medium0.443959
207Course Schedule43.1%Medium0.437379
346Moving Average from Data Stream70.9%Easy0.431272
1281Subtract the Product and Sum of Digits of an Integer85.2%Easy0.430110
289Game of Life54.5%Medium0.424362
301Remove Invalid Parentheses43.3%Hard0.421725
362Design Hit Counter63.7%Medium0.419082
863All Nodes Distance K in Binary Tree55.4%Medium0.416942
97Interleaving String31.5%Hard0.416776
243Shortest Word Distance61.0%Easy0.412033
130Surrounded Regions28.1%Medium0.411166
568Maximum Vacation Days40.8%Hard0.403621
53Maximum Subarray46.5%Easy0.397515
21Merge Two Sorted Lists53.5%Easy0.388444
1188Design Bounded Blocking Queue70.5%Medium0.382859
39Combination Sum56.1%Medium0.381388
282Expression Add Operators35.5%Hard0.379309
279Perfect Squares47.4%Medium0.374114
552Student Attendance Record II36.7%Hard0.372926
759Employee Free Time66.3%Hard0.370403
815Bus Routes42.5%Hard0.344909
805Split Array With Same Average26.4%Hard0.341630
895Maximum Frequency Stack60.6%Hard0.335207
493Reverse Pairs25.2%Hard0.333951
399Evaluate Division51.6%Medium0.333812
238Product of Array Except Self60.1%Medium0.332046
5Longest Palindromic Substring29.5%Medium0.326166
295Find Median from Data Stream44.3%Hard0.323474
11Container With Most Water50.8%Medium0.316097
54201 Matrix39.8%Medium0.312750
315Count of Smaller Numbers After Self41.5%Hard0.308515
131Palindrome Partitioning47.5%Medium0.300117
311Sparse Matrix Multiplication61.9%Medium0.295725
74Search a 2D Matrix36.5%Medium0.291078
51N-Queens46.6%Hard0.288714
161One Edit Distance32.3%Medium0.286989
121Best Time to Buy and Sell Stock50.5%Easy0.286844
451Sort Characters By Frequency63.0%Medium0.285942
1136Parallel Courses61.1%Hard0.285842
699Falling Squares41.8%Hard0.285613
969Pancake Sorting67.5%Medium0.273430
348Design Tic-Tac-Toe54.3%Medium0.262552
290Word Pattern37.0%Easy0.260147
33Search in Rotated Sorted Array34.5%Medium0.256173
432All O`one Data Structure32.4%Hard0.250918
977Squares of a Sorted Array72.1%Easy0.248168
13Roman to Integer55.7%Easy0.245458
490The Maze51.4%Medium0.242022
138Copy List with Random Pointer36.4%Medium0.233000
652Find Duplicate Subtrees50.2%Medium0.230158
59Spiral Matrix II53.9%Medium0.226877
420Strong Password Checker14.0%Hard0.224717
445Add Two Numbers II54.5%Medium0.224135
46Permutations63.5%Medium0.213228
41First Missing Positive32.0%Hard0.208272
43Multiply Strings33.9%Medium0.206748
934Shortest Bridge48.2%Medium0.206663
450Delete Node in a BST43.1%Medium0.206352
733Flood Fill55.3%Easy0.205733
954Array of Doubled Pairs35.6%Medium0.202940
140Word Break II32.6%Hard0.198499
31Next Permutation32.6%Medium0.195797
767Reorganize String48.7%Medium0.194077
283Move Zeroes57.8%Easy0.189603
694Number of Distinct Islands56.0%Medium0.189241
186Reverse Words in a String II43.3%Medium0.188794
449Serialize and Deserialize BST52.0%Medium0.186005
438Find All Anagrams in a String43.3%Medium0.185647
518Coin Change 250.2%Medium0.183738
486Predict the Winner47.9%Medium0.176474
135Candy31.6%Hard0.172962
24Swap Nodes in Pairs50.4%Medium0.172941
1278Palindrome Partitioning III59.9%Hard0.172842
567Permutation in String44.4%Medium0.169310
198House Robber42.0%Easy0.169295
69Sqrt(x)33.9%Easy0.169019
75Sort Colors47.3%Medium0.165667
249Group Shifted Strings55.1%Medium0.161223
211Add and Search Word – Data structure design38.1%Medium0.155199
124Binary Tree Maximum Path Sum34.3%Hard0.155120
979Distribute Coins in Binary Tree68.9%Medium0.153486
722Remove Comments34.6%Medium0.152969
959Regions Cut By Slashes66.2%Medium0.150786
706Design HashMap61.3%Easy0.147688
695Max Area of Island62.7%Medium0.145311
78Subsets62.0%Medium0.145044
210Course Schedule II40.7%Medium0.143883
317Shortest Distance from All Buildings41.4%Hard0.143874
40Combination Sum II48.2%Medium0.143229
395Longest Substring with At Least K Repeating Characters41.4%Medium0.142610
769Max Chunks To Make Sorted54.8%Medium0.140198
242Valid Anagram56.9%Easy0.139639
855Exam Room43.1%Medium0.138044
340Longest Substring with At Most K Distinct Characters44.1%Hard0.136523
322Coin Change35.5%Medium0.135724
255Verify Preorder Sequence in Binary Search Tree45.7%Medium0.134884
981Time Based Key-Value Store53.1%Medium0.131630
118Pascal’s Triangle52.5%Easy0.128523
968Binary Tree Cameras37.5%Hard0.125864
235Lowest Common Ancestor of a Binary Search Tree49.9%Easy0.123997
621Task Scheduler50.1%Medium0.123879
206Reverse Linked List62.5%Easy0.123784
430Flatten a Multilevel Doubly Linked List55.1%Medium0.122133
230Kth Smallest Element in a BST60.2%Medium0.121079
228Summary Ranges39.5%Medium0.120719
647Palindromic Substrings60.6%Medium0.120509
460LFU Cache34.2%Hard0.118481
6ZigZag Conversion36.3%Medium0.116771
72Edit Distance44.8%Hard0.116299
70Climbing Stairs47.8%Easy0.115360
163Sum Closest46.0%Medium0.114104
229Majority Element II35.6%Medium0.113551
155Min Stack44.5%Easy0.112440
889Construct Binary Tree from Preorder and Postorder Traversal66.2%Medium0.107117
337House Robber III50.6%Medium0.102844
391Perfect Rectangle30.5%Hard0.101096
101Symmetric Tree46.8%Easy0.098213
837New 21 Game34.6%Medium0.096460
752Open the Lock51.8%Medium0.094914
827Making A Large Island45.7%Hard0.092874
826Most Profit Assigning Work38.5%Medium0.092874
236Lowest Common Ancestor of a Binary Tree45.7%Medium0.091382
266Palindrome Permutation61.9%Easy0.091248
62Unique Paths54.1%Medium0.089651
918Maximum Sum Circular Subarray33.7%Medium0.088815
692Top K Frequent Words51.8%Medium0.088393
7Reverse Integer25.8%Easy0.087356
150Evaluate Reverse Polish Notation36.3%Medium0.085230
564Find the Closest Palindrome19.7%Hard0.084083
909Snakes and Ladders38.4%Medium0.083926
646Maximum Length of Pair Chain51.9%Medium0.081125
376Wiggle Subsequence39.6%Medium0.080688
122Best Time to Buy and Sell Stock II57.0%Easy0.080662
347Top K Frequent Elements61.2%Medium0.080317
55Jump Game34.6%Medium0.077483
215Kth Largest Element in an Array55.4%Medium0.076200
468Validate IP Address24.1%Medium0.075985
416Partition Equal Subset Sum43.7%Medium0.075586
8String to Integer (atoi)15.4%Medium0.074128
437Path Sum III47.2%Medium0.073497
153Find Minimum in Rotated Sorted Array45.1%Medium0.073435
64Minimum Path Sum54.5%Medium0.072592
378Kth Smallest Element in a Sorted Matrix54.3%Medium0.070590
973K Closest Points to Origin63.8%Medium0.068529
1011Capacity To Ship Packages Within D Days58.1%Medium0.066494
277Find the Celebrity41.8%Medium0.065621
298Binary Tree Longest Consecutive Sequence47.1%Medium0.065169
334Increasing Triplet Subsequence40.0%Medium0.062741
300Longest Increasing Subsequence42.6%Medium0.062656
189Rotate Array34.7%Easy0.062606
1171Remove Zero Sum Consecutive Nodes from Linked List41.4%Medium0.060259
88Merge Sorted Array39.4%Easy0.059258
47Permutations II46.4%Medium0.058979
102Binary Tree Level Order Traversal54.6%Medium0.056692
1038Binary Search Tree to Greater Sum Tree80.8%Medium0.056370
162Find Peak Element43.3%Medium0.055750
983Minimum Cost For Tickets60.5%Medium0.054691
1229Meeting Scheduler52.7%Medium0.053560
829Consecutive Numbers Sum37.5%Hard0.053417
601Human Traffic of Stadium41.7%Hard0.052231
791Custom Sort String65.7%Medium0.051646
560Subarray Sum Equals K43.9%Medium0.051202
648Replace Words56.6%Medium0.051162
740Delete and Earn48.6%Medium0.051096
344Reverse String68.5%Easy0.051072
681Next Closest Time45.0%Medium0.050452
199Binary Tree Right Side View54.1%Medium0.050017
398Random Pick Index56.0%Medium0.049002
547Friend Circles58.6%Medium0.048042
1019Next Greater Node In Linked List57.4%Medium0.047958
1385Find the Distance Value Between Two Arrays67.0%Easy0.046682
670Maximum Swap43.6%Medium0.046304
98Validate Binary Search Tree27.8%Medium0.046091
48Rotate Image56.7%Medium0.044951
232Implement Queue using Stacks49.6%Easy0.044230
338Counting Bits69.5%Medium0.042844
611Valid Triangle Number48.4%Medium0.042559
114Flatten Binary Tree to Linked List49.3%Medium0.042343
739Daily Temperatures63.3%Medium0.039540
66Plus One43.0%Easy0.039245
992Subarrays with K Different Integers48.6%Hard0.037006
729My Calendar I51.8%Medium0.036433
125Valid Palindrome36.7%Easy0.035266
152Maximum Product Subarray31.7%Medium0.034438
177Nth Highest Salary31.4%Medium0.032054
1146Snapshot Array37.0%Medium0.031799
1091Shortest Path in Binary Matrix38.2%Medium0.031648
339Nested List Weight Sum74.0%Easy0.029609
671Second Minimum Node In a Binary Tree42.7%Easy0.029587
264Ugly Number II42.0%Medium0.025923
104Maximum Depth of Binary Tree66.0%Easy0.024815
426Convert Binary Search Tree to Sorted Doubly Linked List59.1%Medium0.024214
662Maximum Width of Binary Tree41.0%Medium0.024116
844Backspace String Compare46.4%Easy0.023555
50Pow(x;n)30.3%Medium0.022194
278First Bad Version35.7%Easy0.021394
45Jump Game II30.6%Hard0.021353
350Intersection of Two Arrays II51.4%Easy0.020680
26Remove Duplicates from Sorted Array45.1%Easy0.017426
299Bulls and Cows42.4%Easy0.016227
516Longest Palindromic Subsequence53.2%Medium0.014931
202Happy Number50.4%Easy0.014045
581Shortest Unsorted Continuous Subarray31.1%Easy0.013342
154Find Minimum in Rotated Sorted Array II41.6%Hard0.013222
852Peak Index in a Mountain Array71.6%Easy0.012618
941Valid Mountain Array33.2%Easy0.011139
94Binary Tree Inorder Traversal63.3%Medium0.007533
145Binary Tree Postorder Traversal55.0%Hard0.007514
349Intersection of Two Arrays62.5%Easy0.007250
203Remove Linked List Elements38.6%Easy0.006479
690Employee Importance57.3%Easy0
171Excel Sheet Column Number55.9%Easy0
373Find K Pairs with Smallest Sums36.7%Medium0
735Asteroid Collision41.0%Medium0
710Random Pick with Blacklist32.5%Hard0
1064Fixed Point66.5%Easy0
1039Minimum Score Triangulation of Polygon49.1%Medium0
1334Find the City With the Smallest Number of Neighbors at a Threshold Distance44.5%Medium0
1400Construct K Palindrome Strings60.4%Medium0
1462Course Schedule IV41.9%Medium0

Leave a Reply