Participate in Codex, Test Your Skills & Win BIG

Coding Interview Questions


# Problem Code Type Topic Companies Average Time Score
1 Design Cache subjective Storage Scalability 40:00 200
2 Highly Available Database subjective Storage Scalability 50:00 400
3 Highly Consistent Database subjective Storage Scalability
50:00 400
4 Sharding a Database subjective Storage Scalability 35:00 200
5 All Unique Permutations code Backtracking
50:50 200
6 Kth Permutation Sequence code Backtracking 72:28 350
7 Combination Sum code Backtracking 61:43 300
8 Permutations code Backtracking 39:33 350
9 Generate all Parentheses II code Backtracking
51:58 350
10 Combination Sum II code Backtracking 41:01 300
11 NQueens code Backtracking 73:26 550
12 Combinations code Backtracking 45:53 300
13 Sudoku code Backtracking 67:13 700
14 Gray Code code Backtracking
57:20 350
15 Subsets II code Backtracking 40:12 300
16 Letter Phone code Backtracking 53:18 250
17 Subset code Backtracking 61:56 250
18 Palindrome Partitioning code Backtracking 67:06 300
19 Lines in a given range shell Basic Shell Commands
28:41 200
20 Valid phone number shell Basic Shell Commands
21:37 150
21 Transform CSV shell Basic Shell Commands
19:55 300
22 Remove Punctuations shell Basic Shell Commands
12:38 250
23 Diffk code Two Pointers
29:28 300
24 Intersection Of Sorted Arrays code Two Pointers
18:20 225
25 Merge Two Sorted Lists II code Two Pointers 25:38 200
26 3 Sum code Two Pointers 60:04 225
27 Remove Duplicates from Sorted Array code Two Pointers 31:38 250
28 Sort by Color code Two Pointers
23:12 325
29 Array 3 Pointers code Two Pointers
53:11 400
30 Container With Most Water code Two Pointers 48:15 400
31 3 Sum Zero code Two Pointers
53:37 225
32 Remove Duplicates from Sorted Array II code Two Pointers 33:23 250
33 Remove Element from Array code Two Pointers 28:29 250
34 Max Continuous Series of 1s code Two Pointers 77:14 300
35 Counting Triangles code Two Pointers
62:48 225
36 Minimize the absolute difference code Two Pointers
60:04 200
37 OSI Model-1 objective Basics of Computer Networking
10:00 30
38 OSI Model-3 objective Basics of Computer Networking
10:00 30
39 Inorder Traversal code Tree Data Structure 32:00 350
40 Recover Binary Search Tree code Tree Data Structure 62:36 750
41 Inorder Traversal of Cartesian Tree code Tree Data Structure 49:57 300
42 Least Common Ancestor code Tree Data Structure 57:33 450
43 Construct Binary Tree From Inorder And Preorder code Tree Data Structure 45:12 375
44 Flatten Binary Tree to Linked List code Tree Data Structure 43:16 500
45 Preorder Traversal code Tree Data Structure 15:26 350
46 Max Depth of Binary Tree code Tree Data Structure 6:57 350
47 Binary Tree From Inorder And Postorder code Tree Data Structure 49:52 375
48 Balanced Binary Tree code Tree Data Structure 30:19 275
49 Sorted Array To Balanced BST code Tree Data Structure 28:30 300
50 Sum Root to Leaf Numbers code Tree Data Structure
45:05 350
51 Symmetric Binary Tree code Tree Data Structure 21:58 300
52 Postorder Traversal code Tree Data Structure 31:28 350
53 Populate Next Right Pointers Tree code Tree Data Structure 50:13 900
54 Identical Binary Trees code Tree Data Structure 11:36 300
55 BST Iterator code Tree Data Structure 40:35 500
56 ZigZag Level Order Traversal BT code Tree Data Structure 42:08 350
57 Path Sum code Tree Data Structure 27:34 350
58 Min Depth of Binary Tree code Tree Data Structure 17:20 350
59 Root to Leaf Paths With Sum code Tree Data Structure 41:03 350
60 Order of People Heights code Tree Data Structure
72:51 700
61 Shortest Unique Prefix code Tree Data Structure
68:01 350
62 Invert the Binary Tree code Tree Data Structure
12:46 300
63 Kth Smallest Element In Tree code Tree Data Structure 29:17 300
64 2-Sum Binary Tree code Tree Data Structure 62:59 400
65 Vertical Order traversal of Binary Tree code Tree Data Structure 71:50 200
66 Hotel Reviews code Tree Data Structure 72:07 200
67 Right view of Binary tree code Tree Data Structure 27:19 200
68 Valid BST from Preorder code Tree Data Structure 49:53 100
69 Diagonal Traversal code Tree Data Structure 41:28 200
70 Cousins in Binary Tree code Tree Data Structure 49:55 200
71 Path to Given Node code Tree Data Structure 35:24 200
72 Remove Half Nodes code Tree Data Structure 40:40 200
73 Kth Row of Pascal's Triangle code Arrays
28:32 225
74 Rotate Matrix code Arrays 60:26 300
75 Max Sum Contiguous Subarray code Arrays 33:39 225
76 Find Duplicate in Array code Arrays 40:13 450
77 Merge Intervals code Arrays
78:57 225
78 Repeat and Missing Number Array code Arrays 63:55 350
79 Merge Overlapping Intervals code Arrays 48:24 225
80 Set Matrix Zeros code Arrays 48:04 300
81 Spiral Order Matrix II code Arrays 48:40 225
82 Largest Number code Arrays 70:26 225
83 First Missing Integer code Arrays 64:38 300
84 Add One To Number code Arrays
43:43 225
85 N/3 Repeat Number code Arrays
68:15 600
86 Pascal Triangle code Arrays 26:46 225
87 Maximum Consecutive Gap code Arrays 58:19 450
88 Max Distance code Arrays 68:14 250
89 Next Permutation code Arrays 63:13 300
90 Wave Array code Arrays 22:08 225
91 Anti Diagonals code Arrays 41:46 225
92 Hotel Bookings Possible code Arrays 66:06 225
93 Min Steps in Infinite Grid code Arrays 37:51 150
94 Flip code Arrays 78:22 400
95 Find Permutation code Arrays 55:37 300
96 Maximum Absolute Difference code Arrays 65:51 250
97 Maximum Unsorted Subarray code Arrays 68:37 250
98 Noble Integer code Arrays
43:30 200
99 Triplets with Sum between given range code Arrays
73:37 200
100 Partitions code Arrays 65:00 300
101 Multiple left rotations of the array code Arrays 22:20 200
102 Implement StrStr code Strings 33:14 225
103 Integer To Roman code Strings 41:32 250
104 Palindrome String code Strings
30:40 150
105 Longest Common Prefix code Strings
27:45 225
106 Roman To Integer code Strings 33:02 250
107 Length of Last Word code Strings 17:54 225
108 Multiply Strings code Strings
63:04 375
109 Valid Number code Strings 58:09 250
110 Zigzag String code Strings
52:22 300
111 Atoi code Strings 52:17 250
112 Valid Ip Addresses code Strings 64:56 250
113 Compare Version Numbers code Strings 65:49 225
114 Longest Palindromic Substring code Strings 59:44 500
115 Pretty Json code Strings
62:34 400
116 Count And Say code Strings 43:00 250
117 Justified Text code Strings
75:32 300
118 Add Binary Strings code Strings
40:32 300
119 Reverse the String code Strings 36:31 250
120 Power of 2 code Strings 62:05 350
121 Minimum Characters required to make a String Palindromic code Strings 64:30 200
122 Amazing Subarrays code Strings
26:33 150
123 Stringoholics code Strings
63:52 300
124 Convert Sorted List to Binary Search Tree code Graph Data Structure & Algorithms
43:16 300
125 Level Order code Graph Data Structure & Algorithms 29:42 300
126 Capture Regions on Board code Graph Data Structure & Algorithms
63:27 500
127 Word Ladder II code Graph Data Structure & Algorithms 61:41 800
128 Clone Graph code Graph Data Structure & Algorithms 54:34 500
129 Word Search Board code Graph Data Structure & Algorithms 55:56 500
130 Word Ladder I code Graph Data Structure & Algorithms 64:29 600
131 Sum Of Fibonacci Numbers code Graph Data Structure & Algorithms
50:50 300
132 Stepping Numbers code Graph Data Structure & Algorithms 56:04 300
133 Black Shapes code Graph Data Structure & Algorithms 48:12 300
134 Knight On Chess Board code Graph Data Structure & Algorithms 64:41 300
135 Smallest Multiple With 0 and 1 code Graph Data Structure & Algorithms 68:39 300
136 Largest Distance between nodes of a Tree code Graph Data Structure & Algorithms
73:10 200
137 Commutable Islands code Graph Data Structure & Algorithms 71:59 200
138 Possibility of finishing all courses given pre-requisites code Graph Data Structure & Algorithms 61:47 200
139 Valid Path code Graph Data Structure & Algorithms 79:41 200
140 Evaluate Expression code Stacks And Queues
32:46 400
141 Rain Water Trapped code Stacks And Queues 59:01 400
142 Largest Rectangle in Histogram code Stacks And Queues 65:38 450
143 Sliding Window Maximum code Stacks And Queues 69:18 450
144 Simplify Directory Path code Stacks And Queues
53:45 250
145 Min Stack code Stacks And Queues 43:31 400
146 Redundant Braces code Stacks And Queues 42:41 300
147 Nearest Smaller Element code Stacks And Queues 41:37 350
148 MAXSPPROD code Stacks And Queues
87:31 200
149 First non-repeating character in a stream of characters code Stacks And Queues 51:27 200
150 Actors and their Movies sql SQL Programming
34:07 100
151 Movie Character sql SQL Programming
32:30 100
152 Neutral Reviewers sql SQL Programming
23:50 100
153 Short Films sql SQL Programming
28:36 100
154 Reverse Bits code Bit Manipulation 23:50 225
155 Number of 1 Bits code Bit Manipulation 8:47 200
156 Single Number code Bit Manipulation 11:53 275
157 Divide Integers code Bit Manipulation 65:47 250
158 Single Number II code Bit Manipulation 39:22 275
159 Different Bits Sum Pairwise code Bit Manipulation
50:24 300
160 Min XOR value code Bit Manipulation 37:42 200
161 Count Total Set Bits code Bit Manipulation 50:02 200
162 Palindromic Binary Representation code Bit Manipulation 52:43 200
163 100 People in a Circle objective Puzzles
12:33 40
164 Ants on a Triangle objective Puzzles
5:00 40
165 Arrange Cubes objective Puzzles
17:07 40
166 Bee Travel objective Puzzles
8:45 40
167 Blindfolded Coin Toss objective Puzzles
3:31 40
168 Breaking Chocolate Bars objective Puzzles
5:18 40
169 Cats and a Square objective Puzzles
8:22 40
170 Celebrity Problem objective Puzzles
9:19 40
171 Color of the Bear objective Puzzles
3:37 40
172 Color of the last ball objective Puzzles
5:27 40
173 Color of the last ball II objective Puzzles
3:23 40
174 Cross the Bridge objective Puzzles
9:13 40
175 Cross the Bridge II objective Puzzles
5:47 40
176 Daughters' Ages objective Puzzles
12:35 40
177 Dinner Hand Shakes objective Puzzles
7:23 40
178 Divide Gold Bar objective Puzzles 6:09 40
179 Divide the Cake objective Puzzles
3:04 40
180 Eggs and Building objective Puzzles 13:59 40
181 Equilateral Triangles using Toothpicks objective Puzzles
6:11 40
182 Fake Note objective Puzzles
5:42 40
183 Fastest Horses objective Puzzles
7:24 40
184 Find the Defective Ball objective Puzzles
6:46 40
185 Find the Defective Ball II objective Puzzles
3:09 40
186 Gates of Heaven objective Puzzles
8:23 40
187 Genie and Hats objective Puzzles
7:50 40
188 Good Processor objective Puzzles
8:12 40
189 Helium Balloon objective Puzzles
1:55 40
190 Jelly Beans Jars objective Puzzles
7:51 40
191 Last Palindromic Date objective Puzzles
11:36 40
192 Light Switches in the Cellar objective Puzzles 3:01 40
193 Make a Statement objective Puzzles 4:25 40
194 Marbles in Jar objective Puzzles
11:43 40
195 Measure Milk by Cans objective Puzzles 16:00 40
196 Measure Time by Burning Ropes objective Puzzles
7:01 40
197 Measure Time by Hourglass objective Puzzles
9:24 40
198 Medicine Chest on a Boat objective Puzzles
9:23 40
199 Min Elevator Trips objective Puzzles
21:25 40
200 Monkeys and Doors objective Puzzles 11:30 40
201 Next Number objective Puzzles
18:15 40
202 Next Number II objective Puzzles 3:13 40
203 One Mile on the Globe objective Puzzles
7:55 40
204 Prisoners and Poison objective Puzzles 18:09 40
205 Quarters on a Table objective Puzzles
5:09 40
206 Ratio of Boys and Girls objective Puzzles
15:32 40
207 Six Colored Cubes objective Puzzles
13:55 40
208 Spider's Web objective Puzzles 3:43 40
209 Spinning Disc's Direction objective Puzzles
7:29 40
210 Ten Black and White Socks objective Puzzles
4:21 40
211 The Tribe objective Puzzles 6:20 40
212 Train Station objective Puzzles
19:08 40
213 Two Numbers objective Puzzles
12:38 40
214 Two Pills each day objective Puzzles
3:27 40
215 Wizards and Drawves objective Puzzles
13:01 40
216 World Trips objective Puzzles
9:41 40
217 Convert Integer To Roman Number shell Regex and Functions
30:17 400
218 Sort by Frequency shell Regex and Functions
32:28 250
219 Swap Forward And Backward Slash shell Regex and Functions
14:28 200
220 Valid Email Address shell Regex and Functions
30:54 350
221 Longest Increasing Subsequence code Dynamic Programming 30:39 300
222 Max Rectangle in Binary Matrix code Dynamic Programming
75:29 350
223 Distinct Subsequences code Dynamic Programming
63:02 325
224 Unique Paths in a Grid code Dynamic Programming
33:07 300
225 Max Product Subarray code Dynamic Programming 63:12 300
226 Ways to Decode code Dynamic Programming 69:29 225
227 Best Time to Buy and Sell Stocks II code Dynamic Programming 39:49 225
228 Best Time to Buy and Sell Stocks III code Dynamic Programming 60:27 700
229 Scramble String code Dynamic Programming
60:06 500
230 Best Time to Buy and Sell Stocks I code Dynamic Programming 27:50 300
231 Max Sum Path in Binary Tree code Dynamic Programming 53:38 400
232 Regular Expression Match code Dynamic Programming
70:15 500
233 Dungeon Princess code Dynamic Programming
65:05 300
234 Palindrome Partitioning II code Dynamic Programming 58:49 400
235 Min Sum Path in Matrix code Dynamic Programming 30:11 300
236 Min Jumps Array code Dynamic Programming 69:59 300
237 Edit Distance code Dynamic Programming 46:50 300
238 Unique Binary Search Trees II code Dynamic Programming 34:37 400
239 Word Break code Dynamic Programming
IBM
63:45 400
240 Regular Expression II code Dynamic Programming
61:49 500
241 Min Sum Path in Triangle code Dynamic Programming
41:52 300
242 Jump Game Array code Dynamic Programming 41:00 225
243 Interleaving Strings code Dynamic Programming
59:36 500
244 Word Break II code Dynamic Programming
IBM
63:29 350
245 Longest valid Parentheses code Dynamic Programming
58:21 700
246 Stairs code Dynamic Programming 15:14 225
247 Max Sum Without Adjacent Elements code Dynamic Programming 57:02 225
248 Repeating Sub-Sequence code Dynamic Programming
62:56 300
249 Evaluate Expression To True code Dynamic Programming 64:29 350
250 Coins in a Line code Dynamic Programming
61:03 300
251 Arrange II code Dynamic Programming 66:35 350
252 Equal Average Partition code Dynamic Programming 76:38 350
253 Coin Sum Infinite code Dynamic Programming
62:32 225
254 Rod Cutting code Dynamic Programming
70:18 350
255 Intersecting Chords in a Circle code Dynamic Programming
66:51 300
256 Count Permutations of BST code Dynamic Programming
66:23 400
257 Queen Attack code Dynamic Programming
64:41 350
258 Longest Arithmetic Progression code Dynamic Programming
71:00 200
259 Sub Matrices with sum Zero code Dynamic Programming
67:32 200
260 N digit numbers with digit sum S code Dynamic Programming
70:01 200
261 Length of Longest Subsequence code Dynamic Programming
64:46 200
262 Shortest common superstring code Dynamic Programming
64:49 200
263 Flip Array code Dynamic Programming
70:32 200
264 Smallest sequence with given Primes code Dynamic Programming 63:22 200
265 Ways to color a 3xN Board code Dynamic Programming 58:03 200
266 Tushar's Birthday Bombs code Dynamic Programming
73:19 200
267 Tushar's Birthday Party code Dynamic Programming 64:35 200
268 Kth Manhattan Distance Neighbourhood code Dynamic Programming 58:32 200
269 Largest area of rectangle with permutations code Dynamic Programming 71:43 200
270 Kingdom War code Dynamic Programming
53:00 200
271 Longest Common Subsequence code Dynamic Programming 38:07 200
272 Longest Palindromic Subsequence code Dynamic Programming
36:56 200
273 Best Time to Buy and Sell Stock atmost B times code Dynamic Programming 58:31 200
274 Palindrome Integer code Math
HCL
17:28 200
275 Excel Column Number code Math 23:19 175
276 Reverse integer code Math 28:36 200
277 Excel Column Title code Math 41:11 175
278 Grid Unique Paths code Math 32:35 375
279 Trailing Zeros in Factorial code Math 18:58 250
280 Rearrange Array code Math
49:03 250
281 Greatest Common Divisor code Math 10:57 200
282 Power Of Two Integers code Math 39:36 250
283 Prime Sum code Math 43:15 150
284 Sorted Permutation Rank code Math 76:44 250
285 Sorted Permutation Rank with Repeats code Math 63:15 500
286 Largest Coprime Divisor code Math
48:50 250
287 Sum of pairwise Hamming Distance code Math
66:14 200
288 Numbers of length N and value less than K code Math
88:48 200
289 FizzBuzz code Math
12:34 200
290 City Tour code Math
54:16 300
291 Merge K Sorted Lists code Heaps And Maps 43:21 600
292 LRU Cache code Heaps And Maps 73:13 1000
293 Distinct Numbers in Window code Heaps And Maps 39:02 600
294 Magician and Chocolates code Heaps And Maps
41:43 250
295 Ways to form Max Heap code Heaps And Maps 70:10 200
296 N max pair combinations code Heaps And Maps 76:21 200
297 Find Rectangle in binary matrix code Heaps And Maps
34:19 200
298 Substring Concatenation code Hashing
70:12 1000
299 Window String code Hashing 78:23 350
300 4 Sum code Hashing 69:26 325
301 Anagrams code Hashing 46:36 350
302 Fraction code Hashing 79:31 450
303 Points on the Straight Line code Hashing 74:54 450
304 2 Sum code Hashing 49:18 300
305 Valid Sudoku code Hashing 49:12 325
306 Copy List code Hashing 54:25 450
307 Diffk II code Hashing
28:53 375
308 Longest Substring Without Repeat code Hashing 50:49 350
309 Colorful Number code Hashing 44:52 150
310 Equal code Hashing
69:52 350
311 Largest Continuous Sequence Zero Sum code Hashing
67:12 200
312 NESTED_CMPL2 objective Time Complexity
1:25 30
313 CHOOSE3 objective Time Complexity
1:39 50
314 NESTED_CMPL3 objective Time Complexity
3:56 80
315 CHOOSE4 objective Time Complexity
0:57 50
316 AMORTIZED1 objective Time Complexity
3:03 100
317 CHOOSE2 objective Time Complexity
2:23 80
318 GCD_CMPL objective Time Complexity
4:13 150
319 LOOP_CMPL2 objective Time Complexity
2:43 80
320 WHILE_CMPL objective Time Complexity
1:31 50
321 CHOOSE1 objective Time Complexity
1:43 50
322 LOOP_CMPL objective Time Complexity
2:43 20
323 NESTED_CMPL objective Time Complexity
1:10 20
324 REC_CMPL1 objective Time Complexity
6:58 80
325 REC_CMPL2 objective Time Complexity
6:25 80
326 REC_CMPL3 objective Time Complexity
4:39 150
327 Matrix Search code Binary Search
36:51 250
328 Median of Array code Binary Search 84:23 325
329 Search for a Range code Binary Search
42:02 250
330 Square Root of Integer code Binary Search 40:32 275
331 Implement Power Function code Binary Search
59:44 275
332 Rotated Sorted Array Search code Binary Search 56:53 325
333 Sorted Insert Position code Binary Search
25:03 250
334 Allocate Books code Binary Search
66:34 350
335 Painter's Partition Problem code Binary Search 81:01 350
336 Matrix Median code Binary Search 76:44 225
337 Simple Queries code Binary Search
64:14 300
338 Find a peak element code Binary Search
17:38 200
339 Design Messenger subjective System Design Interview Questions 41:40 600
340 Design Search Typeahead subjective System Design Interview Questions
53:20 400
341 Design Twitter subjective System Design Interview Questions 38:20 600
342 Design URL Shortener subjective System Design Interview Questions 45:00 300
343 Gas Station code Greedy Algorithm 56:08 700
344 Majority Element code Greedy Algorithm 19:05 400
345 Distribute Candy code Greedy Algorithm 64:00 300
346 Seats code Greedy Algorithm 71:40 300
347 Highest Product code Greedy Algorithm 29:15 200
348 Assign Mice to Holes code Greedy Algorithm 21:04 300
349 Bulbs code Greedy Algorithm
22:53 200
350 Meeting rooms code Greedy Algorithm 48:35 200
351 Swap List Nodes in pairs code Linked Lists 33:34 350
352 Rotate List code Linked Lists 33:55 350
353 Reorder List code Linked Lists 57:07 600
354 Sort List code Linked Lists
57:44 350
355 Remove Duplicates from Sorted List II code Linked Lists 57:51 300
356 Merge Two Sorted Lists code Linked Lists 29:11 300
357 Remove Duplicates from Sorted List code Linked Lists 17:58 300
358 Add Two Numbers as Lists code Linked Lists 43:07 250
359 Remove Nth Node from List End code Linked Lists 27:38 350
360 Partition List code Linked Lists
49:29 275
361 Insertion Sort List code Linked Lists
48:19 300
362 List Cycle code Linked Lists 39:15 600
363 Reverse Link List II code Linked Lists 57:24 450
364 Palindrome List code Linked Lists 47:06 200
365 K reverse linked list code Linked Lists 60:03 200