preloader
  • Home
  • Previous Questions

Contains previous problem statements given by various recruitors during their selection process.

1st Jan, 0001

Uber

IDQuestions
1Two Sum
2Add Two Numbers
3Longest Substring Without Repeating Characters
4Median of Two Sorted Arrays
5Longest Palindromic Substring
6Zigzag Conversion
7Reverse Integer
8String to Integer (atoi)
9Palindrome Number
10Regular Expression Matching
11Container With Most Water
13Roman to Integer
14Longest Common Prefix
153Sum
163Sum Closest
17Letter Combinations of a Phone Number
184Sum
19Remove Nth Node From End of List
20Valid Parentheses
21Merge Two Sorted Lists
22Generate Parentheses
23Merge k Sorted Lists
24Swap Nodes in Pairs
25Reverse Nodes in k-Group
26Remove Duplicates from Sorted Array
27Remove Element
28Find the Index of the First Occurrence in a String
29Divide Two Integers
31Next Permutation
33Search in Rotated Sorted Array
34Find First and Last Position of Element in Sorted Array
35Search Insert Position
36Valid Sudoku
37Sudoku Solver
38Count and Say
39Combination Sum
40Combination Sum II
41First Missing Positive
42Trapping Rain Water
43Multiply Strings
45Jump Game II
46Permutations
48Rotate Image
49Group Anagrams
50Pow(x, n)
51N-Queens
53Maximum Subarray
54Spiral Matrix
55Jump Game
56Merge Intervals
57Insert Interval
58Length of Last Word
59Spiral Matrix II
62Unique Paths
63Unique Paths II
64Minimum Path Sum
67Add Binary
68Text Justification
69Sqrt(x)
70Climbing Stairs
71Simplify Path
72Edit Distance
73Set Matrix Zeroes
74Search a 2D Matrix
75Sort Colors
76Minimum Window Substring
78Subsets
79Word Search
81Search in Rotated Sorted Array II
83Remove Duplicates from Sorted List
84Largest Rectangle in Histogram
88Merge Sorted Array
90Subsets II
91Decode Ways
94Binary Tree Inorder Traversal
95Unique Binary Search Trees II
97Interleaving String
98Validate Binary Search Tree
101Symmetric Tree
102Binary Tree Level Order Traversal
104Maximum Depth of Binary Tree
105Construct Binary Tree from Preorder and Inorder Traversal
110Balanced Binary Tree
111Minimum Depth of Binary Tree
112Path Sum
118Pascal’s Triangle
121Best Time to Buy and Sell Stock
122Best Time to Buy and Sell Stock II
123Best Time to Buy and Sell Stock III
124Binary Tree Maximum Path Sum
125Valid Palindrome
127Word Ladder
128Longest Consecutive Sequence
131Palindrome Partitioning
133Clone Graph
134Gas Station
135Candy
136Single Number
138Copy List with Random Pointer
139Word Break
140Word Break II
141Linked List Cycle
143Reorder List
146LRU Cache
149Max Points on a Line
151Reverse Words in a String
152Maximum Product Subarray
153Find Minimum in Rotated Sorted Array
155Min Stack
160Intersection of Two Linked Lists
161One Edit Distance
162Find Peak Element
163Missing Ranges
167Two Sum II - Input Array Is Sorted
169Majority Element
171Excel Sheet Column Number
174Dungeon Game
177Nth Highest Salary
178Rank Scores
179Largest Number
180Consecutive Numbers
181Employees Earning More Than Their Managers
182Duplicate Emails
186Reverse Words in a String II
188Best Time to Buy and Sell Stock IV
189Rotate Array
196Delete Duplicate Emails
199Binary Tree Right Side View
200Number of Islands
202Happy Number
205Isomorphic Strings
206Reverse Linked List
207Course Schedule
208Implement Trie (Prefix Tree)
210Course Schedule II
212Word Search II
214Shortest Palindrome
215Kth Largest Element in an Array
217Contains Duplicate
218The Skyline Problem
219Contains Duplicate II
221Maximal Square
224Basic Calculator
226Invert Binary Tree
227Basic Calculator II
229Majority Element II
230Kth Smallest Element in a BST
231Power of Two
234Palindrome Linked List
235Lowest Common Ancestor of a Binary Search Tree
238Product of Array Except Self
239Sliding Window Maximum
242Valid Anagram
246Strobogrammatic Number
247Strobogrammatic Number II
249Group Shifted Strings
253Meeting Rooms II
254Factor Combinations
262Trips and Users
266Palindrome Permutation
267Palindrome Permutation II
268Missing Number
269Alien Dictionary
278First Bad Version
279Perfect Squares
283Move Zeroes
287Find the Duplicate Number
290Word Pattern
291Word Pattern II
295Find Median from Data Stream
297Serialize and Deserialize Binary Tree
301Remove Invalid Parentheses
304Range Sum Query 2D - Immutable
305Number of Islands II
310Minimum Height Trees
312Burst Balloons
322Coin Change
328Odd Even Linked List
329Longest Increasing Path in a Matrix
332Reconstruct Itinerary
337House Robber III
341Flatten Nested List Iterator
343Integer Break
345Reverse Vowels of a String
347Top K Frequent Elements
350Intersection of Two Arrays II
354Russian Doll Envelopes
355Design Twitter
358Rearrange String k Distance Apart
361Bomb Enemy
362Design Hit Counter
373Find K Pairs with Smallest Sums
374Guess Number Higher or Lower
378Kth Smallest Element in a Sorted Matrix
380Insert Delete GetRandom O(1)
384Shuffle an Array
387First Unique Character in a String
392Is Subsequence
394Decode String
399Evaluate Division
402Remove K Digits
408Valid Word Abbreviation
412Fizz Buzz
414Third Maximum Number
416Partition Equal Subset Sum
417Pacific Atlantic Water Flow
424Longest Repeating Character Replacement
432All O`one Data Structure
438Find All Anagrams in a String
443String Compression
450Delete Node in a BST
452Minimum Number of Arrows to Burst Balloons
460LFU Cache
465Optimal Account Balancing
473Matchsticks to Square
474Ones and Zeroes
486Predict the Winner
490The Maze
494Target Sum
496Next Greater Element I
502IPO
516Longest Palindromic Subsequence
518Coin Change II
525Contiguous Array
529Minesweeper
532K-diff Pairs in an Array
535Encode and Decode TinyURL
540Single Element in a Sorted Array
541Reverse String II
543Diameter of Binary Tree
545Boundary of Binary Tree
560Subarray Sum Equals K
564Find the Closest Palindrome
572Subtree of Another Tree
581Shortest Unsorted Continuous Subarray
586Customer Placing the Largest Number of Orders
588Design In-Memory File System
605Can Place Flowers
608Tree Node
617Merge Two Binary Trees
621Task Scheduler
636Exclusive Time of Functions
648Replace Words
653Two Sum IV - Input is a BST
658Find K Closest Elements
662Maximum Width of Binary Tree
680Valid Palindrome II
682Baseball Game
690Employee Importance
692Top K Frequent Words
695Max Area of Island
698Partition to K Equal Sum Subsets
699Falling Squares
715Range Module
721Accounts Merge
722Remove Comments
723Candy Crush
724Find Pivot Index
725Split Linked List in Parts
729My Calendar I
731My Calendar II
733Flood Fill
735Asteroid Collision
737Sentence Similarity II
739Daily Temperatures
740Delete and Earn
741Cherry Pickup
747Min Cost Climbing Stairs
753Open the Lock
761Employee Free Time
765Serialize and Deserialize N-ary Tree
768Partition Labels
772Construct Quad Tree
778Reorganize String
785Basic Calculator III
787Sliding Puzzle
789Kth Largest Element in a Stream
792Binary Search
794Swim in Rising Water
796Reaching Points
801Is Graph Bipartite?
815Champagne Tower
833Bus Routes
835Linked List Components
854Making A Large Island
877Shortest Path Visiting All Nodes
879Maximize Distance to Closest Person
881Loud and Rich
882Peak Index in a Mountain Array
885Exam Room
893All Nodes Distance K in Binary Tree
894Random Pick with Blacklist
895Shortest Path to Get All Keys
907Koko Eating Bananas
908Middle of the Linked List
912Random Pick with Weight
917Boats to Save People
922Possible Bipartition
938Numbers At Most N Given Digit Set
948Sort an Array
957Minimum Add to Make Parentheses Valid
966Binary Subarrays With Sum
971Shortest Bridge
978Valid Mountain Array
990Verifying an Alien Dictionary
999Regions Cut By Slashes
1019Squares of a Sorted Array
1023Time Based Key-Value Store
1028Interval List Intersections
1029Vertical Order Traversal of a Binary Tree
1034Subarrays with K Different Integers
1036Rotting Oranges
1044Find Common Characters
1050Construct Binary Search Tree from Preorder Traversal
1056Capacity To Ship Packages Within D Days
1060Longest Repeating Substring
1066Fixed Point
1086Divisor Game
1087Longest Arithmetic Subsequence
1101Parallel Courses
1107Minimum Swaps to Group All 1’s Together
1108Analyze User Website Visit Pattern
1111Minimum Score Triangulation of Polygon
1122Longest Duplicate Substring
1127Last Stone Weight
1170Shortest Common Supersequence
1185Find in Mountain Array
1197Parsing A Boolean Expression
1211Iterator for Combination
1240Stone Game II
1250Longest Common Subsequence
1252Break a Palindrome
1267Remove Zero Sum Consecutive Nodes from Linked List
1306Minimum Absolute Difference
1352Maximum Profit in Job Scheduling
1360Maximum Length of a Concatenated String with Unique Characters
1374Leftmost Column with at Least a One
1406Subtract the Product and Sum of Digits of an Integer
1411Convert Binary Number in a Linked List to Integer
1414Shortest Path in a Grid with Obstacles Elimination
1444Number of Steps to Reduce a Number to Zero
1446Angle Between Hands of a Clock
1451Minimum Number of Taps to Open to Water a Garden
1456Find the City With the Smallest Number of Neighbors at a Threshold Distance
1457Minimum Difficulty of a Job Schedule
1474Longest ZigZag Path in a Binary Tree
1476Count Negative Numbers in a Sorted Matrix
1478Maximum Number of Events That Can Be Attended
1486Find the Distance Value Between Two Arrays
1502Construct K Palindrome Strings
1503Reducing Dishes
1505Create Target Array in the Given Order
1528Kids With the Greatest Number of Candies
1538Maximum Points You Can Obtain from Cards
1549Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
1558Course Schedule IV
1603Running Sum of 1d Array
1635Number of Good Pairs
1637String Compression II
1638Best Position for a Service Centre
1643Number of Nodes in the Sub-Tree With the Same Label
1701Remove Max Number of Edges to Keep Graph Fully Traversable
1706Min Cost to Connect All Points
1708Design Parking System
1734Bank Account Summary II
1741Sort Array by Increasing Frequency
1753Path With Minimum Effort
1779Hopper Company Queries I
1785Hopper Company Queries II
1795Hopper Company Queries III
1802Number of Students Unable to Eat Lunch
1820Number Of Ways To Reconstruct A Tree
1824Maximum Number of Eaten Apples
1866Restore the Array From Adjacent Pairs
1878Check if Array Is Sorted and Rotated
1881Closest Subsequence Sum
1883Find Distance in a Binary Tree
1894Merge Strings Alternately
1909Buildings With an Ocean View
1925Count Nice Pairs in an Array
1940Maximum XOR for Each Query
1946Minimum Absolute Sum Difference
1966Frequency of the Most Frequent Element
1972Rotating the Box
1985Maximum Subarray Min-Product
1990Get Biggest Three Rhombus Sums in a Grid
1997Next Palindrome Using Same Digits
2038Nearest Exit from Entrance in Maze
2058Concatenation of Array
2065Check for Contradictions in Equations
2072Maximum of Minimum Values in All Subarrays
2085Array With Elements Not Equal to Average of Neighbors
2093Check If String Is a Prefix of Array
2099Number of Strings That Appear as Substrings in Word
2119Minimum Number of Operations to Make Array Continuous
2133Number of Pairs of Strings With Concatenation Equal to Target
2162Partition Array Into Two Arrays to Minimize Sum Difference
2220Find All Possible Recipes from Given Supplies
2246Maximum Employees to Be Invited to a Meeting
2255Minimum Swaps to Group All 1’s Together II
2267Minimum Difference in Sums After Removal of Elements
2271Rearrange Array Elements by Sign
2277Count Equal and Divisible Pairs in an Array
2294Minimum Time to Complete Trips
2297Amount of New Area Painted Each Day
2306Create Binary Tree From Descriptions
2331Intersection of Multiple Arrays
2334Number of Flowers in Full Bloom
2339K Divisible Elements Subarrays
2344Escape the Spreading Fire
2361Calculate Digit Sum of a String
2383Add Two Integers
2418Minimum Sum of Squared Difference
2425Number of People That Can Be Seen in a Grid
2479Meeting Rooms III
2563Split Message Based on Limit
2583Divide Nodes Into the Maximum Number of Groups
2673Maximize Win From Two Segments
2681Put Marbles in Bags
2717Collect Coins in a Tree
2755Extra Characters in a String
2809Create Hello World Function
2977Check if a String Is an Acronym of Words
3034Points That Intersect With Cars
3198Number of Ways to Reach Destination in the Grid