InterviewBit Academy is now Scaler!
Learn Tech Skills from Scratch @ Scaler EDGE

Coding Interview Questions


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