preloader
  • Home
  • Previous Questions

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

1st Jan, 0001

Adobe

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
12Integer to Roman
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
30Substring with Concatenation of All Words
31Next Permutation
32Longest Valid Parentheses
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
44Wildcard Matching
45Jump Game II
46Permutations
48Rotate Image
49Group Anagrams
50Pow(x, n)
51N-Queens
52N-Queens II
53Maximum Subarray
54Spiral Matrix
55Jump Game
56Merge Intervals
57Insert Interval
58Length of Last Word
60Permutation Sequence
61Rotate List
62Unique Paths
66Plus One
67Add Binary
68Text Justification
69Sqrt(x)
70Climbing Stairs
72Edit Distance
73Set Matrix Zeroes
74Search a 2D Matrix
75Sort Colors
76Minimum Window Substring
77Combinations
78Subsets
79Word Search
80Remove Duplicates from Sorted Array II
81Search in Rotated Sorted Array II
82Remove Duplicates from Sorted List II
83Remove Duplicates from Sorted List
84Largest Rectangle in Histogram
85Maximal Rectangle
86Partition List
87Scramble String
88Merge Sorted Array
89Gray Code
90Subsets II
92Reverse Linked List II
94Binary Tree Inorder Traversal
95Unique Binary Search Trees II
96Unique Binary Search Trees
97Interleaving String
98Validate Binary Search Tree
100Same Tree
101Symmetric Tree
102Binary Tree Level Order Traversal
103Binary Tree Zigzag Level Order Traversal
104Maximum Depth of Binary Tree
105Construct Binary Tree from Preorder and Inorder Traversal
108Convert Sorted Array to Binary Search Tree
109Convert Sorted List to Binary Search Tree
110Balanced Binary Tree
112Path Sum
113Path Sum II
114Flatten Binary Tree to Linked List
116Populating Next Right Pointers in Each Node
117Populating Next Right Pointers in Each Node II
118Pascal’s Triangle
119Pascal’s Triangle II
120Triangle
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
126Word Ladder II
127Word Ladder
128Longest Consecutive Sequence
129Sum Root to Leaf Numbers
131Palindrome Partitioning
133Clone Graph
134Gas Station
135Candy
136Single Number
137Single Number II
138Copy List with Random Pointer
139Word Break
140Word Break II
141Linked List Cycle
142Linked List Cycle II
143Reorder List
144Binary Tree Preorder Traversal
146LRU Cache
148Sort List
149Max Points on a Line
151Reverse Words in a String
152Maximum Product Subarray
153Find Minimum in Rotated Sorted Array
154Find Minimum in Rotated Sorted Array II
155Min Stack
160Intersection of Two Linked Lists
162Find Peak Element
164Maximum Gap
165Compare Version Numbers
167Two Sum II - Input Array Is Sorted
169Majority Element
174Dungeon Game
175Combine Two Tables
176Second Highest Salary
177Nth Highest Salary
178Rank Scores
179Largest Number
180Consecutive Numbers
183Customers Who Never Order
185Department Top Three Salaries
188Best Time to Buy and Sell Stock IV
189Rotate Array
191Number of 1 Bits
195Tenth Line
197Rising Temperature
198House Robber
199Binary Tree Right Side View
200Number of Islands
202Happy Number
203Remove Linked List Elements
204Count Primes
205Isomorphic Strings
206Reverse Linked List
207Course Schedule
209Minimum Size Subarray Sum
213House Robber II
214Shortest Palindrome
215Kth Largest Element in an Array
216Combination Sum III
217Contains Duplicate
219Contains Duplicate II
220Contains Duplicate III
221Maximal Square
224Basic Calculator
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
236Lowest Common Ancestor of a Binary Tree
237Delete Node in a Linked List
238Product of Array Except Self
239Sliding Window Maximum
240Search a 2D Matrix II
241Different Ways to Add Parentheses
242Valid Anagram
258Add Digits
260Single Number III
262Trips and Users
263Ugly Number
264Ugly Number II
268Missing Number
274H-Index
278First Bad Version
279Perfect Squares
283Move Zeroes
285Inorder Successor in BST
287Find the Duplicate Number
289Game of Life
290Word Pattern
292Nim Game
295Find Median from Data Stream
297Serialize and Deserialize Binary Tree
299Bulls and Cows
300Longest Increasing Subsequence
301Remove Invalid Parentheses
309Best Time to Buy and Sell Stock with Cooldown
312Burst Balloons
315Count of Smaller Numbers After Self
316Remove Duplicate Letters
318Maximum Product of Word Lengths
319Bulb Switcher
322Coin Change
324Wiggle Sort II
327Count of Range Sum
328Odd Even Linked List
334Increasing Triplet Subsequence
337House Robber III
338Counting Bits
341Flatten Nested List Iterator
342Power of Four
344Reverse String
345Reverse Vowels of a String
347Top K Frequent Elements
348Design Tic-Tac-Toe
349Intersection of Two Arrays
350Intersection of Two Arrays II
354Russian Doll Envelopes
356Line Reflection
366Find Leaves of Binary Tree
371Sum of Two Integers
372Super Pow
373Find K Pairs with Smallest Sums
374Guess Number Higher or Lower
377Combination Sum IV
378Kth Smallest Element in a Sorted Matrix
380Insert Delete GetRandom O(1)
383Ransom Note
387First Unique Character in a String
392Is Subsequence
394Decode String
395Longest Substring with At Least K Repeating Characters
399Evaluate Division
402Remove K Digits
403Frog Jump
410Split Array Largest Sum
412Fizz Buzz
413Arithmetic Slices
414Third Maximum Number
415Add Strings
417Pacific Atlantic Water Flow
421Maximum XOR of Two Numbers in an Array
424Longest Repeating Character Replacement
437Path Sum III
438Find All Anagrams in a String
441Arranging Coins
442Find All Duplicates in an Array
443String Compression
446Arithmetic Slices II - Subsequence
450Delete Node in a BST
451Sort Characters By Frequency
453Minimum Moves to Equal Array Elements
4544Sum II
455Assign Cookies
456132 Pattern
458Poor Pigs
460LFU Cache
462Minimum Moves to Equal Array Elements II
473Matchsticks to Square
474Ones and Zeroes
485Max Consecutive Ones
486Predict the Winner
493Reverse Pairs
494Target Sum
496Next Greater Element I
500Keyboard Row
501Find Mode in Binary Search Tree
503Next Greater Element II
506Relative Ranks
515Find Largest Value in Each Tree Row
518Coin Change II
523Continuous Subarray Sum
525Contiguous Array
528Swapping Nodes in a Linked List
532K-diff Pairs in an Array
535Encode and Decode TinyURL
538Convert BST to Greater Tree
540Single Element in a Sorted Array
541Reverse String II
54201 Matrix
543Diameter of Binary Tree
556Next Greater Element III
560Subarray Sum Equals K
561Array Partition
566Reshape the Matrix
567Permutation in String
572Subtree of Another Tree
584Find Customer Referee
586Customer Placing the Largest Number of Orders
594Longest Harmonious Subsequence
595Big Countries
605Can Place Flowers
606Construct String from Binary Tree
617Merge Two Binary Trees
621Task Scheduler
628Maximum Product of Three Numbers
632Smallest Range Covering Elements from K Lists
637Average of Levels in Binary Tree
643Maximum Average Subarray I
647Palindromic Substrings
653Two Sum IV - Input is a BST
658Find K Closest Elements
662Maximum Width of Binary Tree
665Non-decreasing Array
680Valid Palindrome II
692Top K Frequent Words
697Degree of an Array
698Partition to K Equal Sum Subsets
714Best Time to Buy and Sell Stock with Transaction Fee
7171-bit and 2-bit Characters
718Maximum Length of Repeated Subarray
724Find Pivot Index
725Split Linked List in Parts
733Flood Fill
735Asteroid Collision
740Delete and Earn
744Network Delay Time
747Min Cost Climbing Stairs
748Largest Number At Least Twice of Others
764N-ary Tree Level Order Traversal
768Partition Labels
778Reorganize String
779Max Chunks To Make Sorted II
782Jewels and Stones
783Search in a Binary Search Tree
789Kth Largest Element in a Stream
792Binary Search
795K-th Symbol in Grammar
803Cheapest Flights Within K Stops
806Domino and Tromino Tiling
808Number of Matching Subsequences
809Preimage Size of Factorial Zeroes Function
811Number of Subarrays with Bounded Maximum
812Rotate String
813All Paths From Source to Target
815Champagne Tower
820Find Eventual Safe States
826Soup Servings
837Most Common Word
843Binary Trees With Factors
854Making A Large Island
866Rectangle Overlap
871Keys and Rooms
882Peak Index in a Mountain Array
888Mirror Reflection
892Shortest Subarray with Sum at Least K
893All Nodes Distance K in Binary Tree
900Reordered Power of 2
907Koko Eating Bananas
908Middle of the Linked List
924Fair Candy Swap
926Find and Replace Pattern
930All Possible Full Binary Trees
931Maximum Frequency Stack
932Monotonic Array
933Increasing Order Search Tree
937Online Stock Span
944Smallest Range I
946Smallest Range II
948Sort an Array
952Word Subsets
954Maximum Sum Circular Subarray
9593Sum With Multiplicity
971Shortest Bridge
977Distinct Subsequences II
979DI String Match
983Validate Stack Sequences
1007Numbers With Same Consecutive Differences
1013Fibonacci Number
1014K Closest Points to Origin
1017Odd Even Jump
1018Largest Perimeter Triangle
1022Unique Paths III
1025Minimum Cost For Tickets
1029Vertical Order Traversal of a Binary Tree
1034Subarrays with K Different Integers
1035Cousins in Binary Tree
1036Rotting Oranges
1039Find the Town Judge
1045Check If Word Is Valid After Substitutions
1046Max Consecutive Ones III
1054Complement of Base 10 Integer
1056Capacity To Ship Packages Within D Days
1062Partition Array Into Three Parts With Equal Sum
1070Convert to Base -2
1073Number of Enclaves
1078Remove Outermost Parentheses
1086Divisor Game
1087Longest Arithmetic Subsequence
1111Minimum Score Triangulation of Polygon
1119Robot Bounded In Circle
1121Partition Array for Maximum Sum
1127Last Stone Weight
1128Remove All Adjacent Duplicates In String
1129Longest String Chain
1135Customers Who Bought All Products
1142Minimum Knight Moves
1146Greatest Common Divisor of Strings
1153Product Sales Analysis I
1165Meeting Scheduler
1171Shortest Path in Binary Matrix
1179Game Play Analysis I
1182Game Play Analysis IV
1184Car Pooling
1205Defanging an IP Address
1209Design Bounded Blocking Queue
1212Sequential Digits
1221Element Appearing More Than 25% In Sorted Array
1228Minimum Cost Tree From Leaf Values
1231Replace Elements with Greatest Element on Right Side
1236N-th Tribonacci Number
1247Decrease Elements To Make Array Zigzag
1250Longest Common Subsequence
1258Article Views I
1285Balance a Binary Search Tree
1296Kth Ancestor of a Tree Node
1297Maximum Number of Balloons
1298Reverse Substrings Between Each Pair of Parentheses
1299K-Concatenation Maximum Sum
1300Critical Connections in a Network
1313Count Ways to Build Rooms in an Ant Colony
1317Monthly Transactions I
1319Unique Number of Occurrences
1329Minimum Cost to Move Chips to The Same Position
1352Maximum Profit in Job Scheduling
1370Count Number of Nice Subarrays
1371Minimum Remove to Make Valid Parentheses
1380Number of Closed Islands
1390Average Selling Price
1392Find the Difference of Two Arrays
1397Search Suggestions System
1405All People Report to the Given Manager
1406Subtract the Product and Sum of Digits of an Integer
1407Group the People Given the Group Size They Belong To
1421Find Numbers with Even Number of Digits
1427All Elements in Two Binary Search Trees
1437Minimum Insertion Steps to Make a String Palindrome
1446Angle Between Hands of a Clock
1448Maximum 69 Number
1457Minimum Difficulty of a Job Schedule
1460Number of Substrings Containing All Three Characters
1464Reduce Array Size to The Half
1484Linked List in Binary Tree
1488Sort Integers by The Power Value
1500Count Largest Group
1528Kids With the Greatest Number of Candies
1537Maximum Score After Splitting a String
1552Build an Array With Stack Operations
1559Cherry Pickup II
1580Shuffle the Array
1586Longest Subarray of 1’s After Deleting One Element
1603Running Sum of 1d Array
1605Minimum Number of Days to Make m Bouquets
1621Number of Subsequences That Satisfy the Given Sum Condition
1625Group Sold Products By The Date
1630Count Odd Numbers in an Interval Range
1635Number of Good Pairs
1637String Compression II
1646Kth Missing Positive Number
1651Shuffle String
1657Find the Winner of an Array Game
1661Minimum Number of Vertices to Reach All Nodes
1669Minimum Cost to Cut a Stick
1677Matrix Diagonal Sum
1690Maximum Length of Subarray With Positive Product
1693Sum of All Odd Length Subarrays
1701Remove Max Number of Edges to Keep Graph Fully Traversable
1706Min Cost to Connect All Points
1724Customer Who Visited but Did Not Make Any Transactions
1738Maximal Network Rank
1752Arithmetic Subarrays
1756Minimum Deletions to Make String Balanced
1771Sell Diminishing-Valued Colored Balls
1776Minimum Operations to Reduce X to Zero
1782Smallest String With A Given Numeric Value
1787Sum of Absolute Differences in a Sorted Array
1791Richest Customer Wealth
1801Average Time of Process per Machine
1806Count of Matches in Tournament
1807Partitioning Into Minimum Number Of Deci-Binary Numbers
1811Fix Names in a Table
1813Maximum Erasure Value
1817Calculate Money in Leetcode Bank
1824Maximum Number of Eaten Apples
1825Find Minimum Time to Finish All Jobs
1829Maximum Units on a Truck
1833Find the Highest Altitude
1839Decode XORed Array
1878Check if Array Is Sorted and Rotated
1884Minimum Changes To Make Alternating Binary String
1892Find Total Time Spent by Each Employee
1894Merge Strings Alternately
1899Count Items Matching a Rule
1908Recyclable and Low Fat Products
1929Maximum Value at a Given Index in a Bounded Array
1960Check if the Sentence Is Pangram
1970Sorting the Sentence
1986Largest Color Value in a Directed Graph
1987Substrings of Size Three with Distinct Characters
1988Minimize Maximum Pair Sum in Array
2015Determine Whether Matrix Can Be Obtained By Rotation
2032Largest Odd Number in String
2048Build Array from Permutation
2058Concatenation of Array
2059Unique Length-3 Palindromic Subsequences
2110Employees With Missing Information
2117Find Original Array From Doubled Array
2119Minimum Number of Operations to Make Array Continuous
2127Employees Whose Manager Left the Company
2162Partition Array Into Two Arrays to Minimize Sum Difference
2165Plates Between Candles
2211K Radius Subarray Averages
2213Find All People With Secret
2216Delete the Middle Node of a Linked List
2263Maximum Running Time of N Computers
2264Minimum Sum of Four Digit Number After Splitting Digits
2271Rearrange Array Elements by Sign
2282Choose Numbers From Two Arrays in Range
2284Smallest Value of the Rearranged Number
2338Minimum Consecutive Cards to Pick Up
2356Largest Combination With Bitwise AND Greater Than Zero
2383Add Two Integers
2409Number of Increasing Paths in a Grid
2428Equal Row and Column Pairs
2457Count Special Integers
2469Longest Subsequence With Limited Sum
2471Minimum Amount of Time to Collect Garbage
2475Largest Palindromic Number
2488Divide Intervals Into Minimum Number of Groups
2509Minimize XOR
2565Merge Operations to Turn Array Into a Palindrome
2636Maximum Subsequence Score
2732Counter
2733Sleep
2734Array Prototype Last
2739Minimize the Total Price of the Trips
2747Apply Transform Over Each Element in Array
2764Maximum Number of Fish in a Grid
2808Painting the Walls
2809Create Hello World Function
2813To Be Or Not To Be
2821Timeout Cancellation
2849Sum of Imbalance Numbers of All Subarrays
2864Is Object Empty
2868Continuous Subarrays
2876Number of Employees Who Met the Target
3062Create a DataFrame from List
3093Sum of Values at Indices With K Set Bits
3177Minimizing Array After Replacing Pairs With Their Product
3213Count Subarrays Where Max Element Appears at Least K Times