-
Notifications
You must be signed in to change notification settings - Fork 17
/
100-interview-problems-checklist.txt
405 lines (363 loc) · 28.7 KB
/
100-interview-problems-checklist.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
100 Must attempt Problems for Coding Interview: Checklist
These 100 algorithmic problems will give you all core concepts and insights to solve Interview Problems at top tech companies like Google. This is an economical approach alternative to practicing 500+ problems over 3 to 4 years. If you are in the problem solving mindset, you can ace any interview. Save time and study smarter.
Array problems
==============
1. Move Negative elements to front
Move Negative elements to front is a simple problem that tests your knowledge of how to move elements across an array. These involve partition algorithms like Lomuto and Hoare Partition Scheme and has direct application in algorithms like QuickSort.
Links (3): https://iq.opengenus.org/move-negative-elements-to-front/, https://iq.opengenus.org/lomuto-partition-scheme/, https://iq.opengenus.org/hoare-partition/
2. 2 Sum Problem
2 Sum problem is a standard problem where you need to find two elements that add up to a given number. The advanced form is to find 2 numbers whose sum to closest to the target.
Links (2): https://iq.opengenus.org/two-sum/, https://iq.opengenus.org/2-sum-closest/
3. 3 Sum Problem
In Interviews, you need to build on problems. 3 Sum problem tests your knowledge from the previous problem.
Links (1): https://iq.opengenus.org/triplet-with-given-sum/
4. 3 Sum Closest Problem
You have attempted the 2 Sum Closest problem variant but can you use similar ideas to solve 3 Sum Closest problem as well.
Links (1): https://iq.opengenus.org/closest-3-sum-problem/
5. 4 Sum Problem
4 Sum problem brings in new ideas and puts your knowledge from previous problems to test. If you are able to solve it, try the 4 Sum Closest problem on your own.
Links (1): https://iq.opengenus.org/4-sum-problem/
---
Linked List problems
====================
1. Linked List with no NULLs
This is an important topic that you must cover. In interviews at top companies like Google, you must implement Linked List without using NULL as this is the standard coding practice in Industry.
Links (1): https://iq.opengenus.org/linked-list-with-no-nulls/
2. XOR Linked List
XOR Linked List is the memory efficient version of Doubly Linked List. The concept of using XOR in such cases in very important for Interviews.
Links (2): https://iq.opengenus.org/xor-linked-list/, https://iq.opengenus.org/doubly-linked-list/
3. Linked List vs Array
Understand the differences between Array and Linked List. Often, asked in initial rounds.
Links (1): https://iq.opengenus.org/array-vs-linked-list/
4. Binary Search on LL
Binary Search is frequently used to solve Interview problem. Is Binary Search on Linked List equally efficient?.
Links (1): https://iq.opengenus.org/binary-search-in-linked-list/
5. Middle element in LL
This problem of "Finding middle element of a Linked List" involves the technique of Slow and Fast pointer which is widely used.
Links (1): https://iq.opengenus.org/find-middle-of-a-linked-list/
6. Sort LL on absolute values
Sort Linked List whose values have already been sorted on absolute values is a HOT interview problem.
Links (1): https://iq.opengenus.org/sort-a-linked-list-already-sorted-on-absolute-values/
7. Loop in Linked List
There are 3 methods to detect a loop in Linked List.
Links (1): https://iq.opengenus.org/detect-loop-in-linked-list/
8. Reverse a Linked List
Reversing a Linked List may seem to be a simple problem but it uses 3 pointers. The challenge is to reverse a Linked List using 2 pointers. This involves the idea of XOR.
Links (1): https://iq.opengenus.org/reverse-linked-list-using-2-pointers-xor/
9. Cycle detection
This is a HOT interview question. There are over 3 methods to detect Cycle in a Linked List and a follow-up question will to be remove a cycle.
Links (2): https://iq.opengenus.org/cycle-detection-algorithms/, https://iq.opengenus.org/detect-and-remove-loop-in-linked-list/
---
Stack problems
==============
1. 2 Stacks in one Array
This problem of implementing 2 Stacks in 1 array is a simple problem. The main challenge is with the next problem.
Links (1): https://iq.opengenus.org/two-stacks-in-one-array/
2. N Stacks in one Array
This problem is much more challenging problem. Understand the solution carefully as this is a HOT interview question now. Similar problem is N Queues in one Array.
Links (2): https://iq.opengenus.org/k-stacks-in-one-array/, https://iq.opengenus.org/k-queues-in-array/
3. Monotonic Stack
Monotonic Stack is a core technique which exploits the properties of Stack to solve several challenging problems. Go through some example problems to hone your skills.
Links (1): https://iq.opengenus.org/tag/monotonic-stack/
4. Merge Intervals
The problem of Merge Intervals is a HOT interview problem. It is, often formulate as Time interval or duration of an event.
Links (1): https://iq.opengenus.org/merge-intervals/
---
Queue problems
==============
1. Delete middle element of Queue
Delete middle element of Queue is a simple problem that tests how you can use core operations to build other operations. If needed, you should quickly revise the basics of Queue and types of Queue.
Links (3): https://iq.opengenus.org/delete-middle-element-of-queue/, https://iq.opengenus.org/queue/, https://iq.opengenus.org/queue-types-and-implementation/
2. Monotonic Queue
Monotonic Queue is a core technique using Queue to solve challenging problems like Daily Temperate problem.
Links (1): https://iq.opengenus.org/monotonic-queue/
3. Queue using Stack
Implementing Queue using Stack data structure is another important Interview problem to test your concepts. The corresponding problem is to Implement Stack using Queue.
Links (2): https://iq.opengenus.org/queue-using-stack/, https://iq.opengenus.org/stack-using-queue/
4. Next Larger / Smaller element in Array
Next Larger / Smaller element in Array is a difficult interview problem that use the idea of Monotonic Queue.
Links (1): https://iq.opengenus.org/next-larger-smaller-element/
5. Maximal Rectangle problem
Maximal Rectangle problem is another difficult interview problem that use the idea of Monotonic Queue.
Links (1): https://iq.opengenus.org/maximal-rectangle-problem/
---
Binary Tree
===========
1. Diameter and Height
Finding the Diameter and Height of a Binary Tree is a simple yet core problem that everyone should be fluent in. Every few students know that the average height of a random Binary Tree is O(N^0.5) (see how?).
Links (3): https://iq.opengenus.org/diameter-of-binary-tree/, https://iq.opengenus.org/find-height-or-depth-of-binary-tree/, https://iq.opengenus.org/average-height-of-random-binary-tree/
2. No NULL implementation
Implementing Binary Tree with no NULLs is an approach that sets you apart from other candidates. Avoiding NULLs is Industry standard.
Links (1): https://iq.opengenus.org/binary-search-tree-with-no-nulls/
3. Largest Independent Set
Finding the Largest Independent Set in Binary Tree is a problem that requires the application of Dynamic Programming. This is an important interview problem.
Links (1): https://iq.opengenus.org/largest-independent-set-in-binary-tree/
4. Copy Binary Tree
Copying a Binary Tree with random pointers is a challenging problem. The trick is to handle the random pointers efficiently as the destination node may not have been processed. A related concept is Threaded Binary Tree.
Links (2): https://iq.opengenus.org/copy-a-binary-tree-with-random-pointers/, https://iq.opengenus.org/threaded-binary-tree/
5. Traversal of Binary Tree
Zig Zag traversal and Level Order traversal of a Binary Tree is a problem that tests your Binary Tree handling skills. Different types of view of a Binary Tree is equally important problem.
Links (3): https://iq.opengenus.org/zigzag-traversal-of-binary-tree/, https://iq.opengenus.org/level-order-traversal-binary-tree/, https://iq.opengenus.org/views-in-binary-tree/
6. Self-balancing Trees
Self-balancing Trees are important concepts. Interviewers usually ask to list a few self-balancing binary trees. Some advanced levels may ask to explain the idea behind Red Black Tree.
Links (2): https://iq.opengenus.org/different-self-balancing-binary-trees/, https://iq.opengenus.org/red-black-tree-insertion/
7. Spreadsheet
A HOT interview question is to design a spreadsheet / Excel sheet. This ivolve the idea of using Binary Tree.
Links (1): https://iq.opengenus.org/data-structure-for-spreadsheet/
---
Trie problems
=============
1. Maximum XOR of two numbers
This problem of finding the Maximum XOR of two numbers involve the use of Trie data structure which is not obvious from the problem statement.
Links (1): https://iq.opengenus.org/maximum-xor-trie/
2. Longest Common Suffix
This is a HOT interview problem. Finding the Longest Common Suffix cannot be done efficiently using Trie. Similarly, you can solve the Longest Common Prefix problem.
Links (2): https://iq.opengenus.org/longest-common-suffix/, https://iq.opengenus.org/longest-common-prefix/
3. All Valid Word Breaks of a Sentence
Word Break Problem is a standard problem that involve the use of DP and Greedy algorithms. This variant: All Valid Word Breaks of a Sentence use Trie to solve it optimally.
Links (1): https://iq.opengenus.org/all-valid-word-breaks/
4. Autocomplete feature
Autocomplete feature is the most common feature of True data structure and Interviews revolve around this specific application.
Links (1): https://iq.opengenus.org/autocomplete-using-trie-data-structure/
---
Hash Map / Set
==============
1. Collision Resolution
There are different Collision Resolution techniques in a Hash Set and is frequently asked in Interviews.
Links (1): https://iq.opengenus.org/different-collision-resolution-techniques-in-hashing/
2. LFU (Least Frequently Used) Cache
Designing LFU (Least Frequently Used) Cache is a HOT interview question that involve the use of Hash Map. Another related problem is to design Least Recently Used (LRU) Cache.
Links (2): https://iq.opengenus.org/least-frequently-used-cache/, https://iq.opengenus.org/implement-lru-cache/
3. Quadratic Probing
The concept of Quadratic Probing and Linear Probing are frequently asked in Interviews.
Links (2): https://iq.opengenus.org/quadratic-probing/, https://iq.opengenus.org/linear-probing/
4. Hash Functions
Knowing multiple examples of Hash Functions is important for Interview as it is the fundamental component of Hash Set. You may need to hash an array or set.
Links (1): https://iq.opengenus.org/hash-functions-examples/
5. All O`one Data Structure
This problem is about designing a custom Data Structure. These type of problems are HOT in interview. Try: All O`one Data Structure.
Links (1): https://iq.opengenus.org/all-oone-data-structure/
---
Sorting Algorithms
==================
1. Search in Sorted 2D matrix
The problem to Search an element in Sorted 2D matrix is a HOT interview problem.
Links (1): https://iq.opengenus.org/search-element-in-sorted-2d-matrix/
2. Quick Sort
Quick Sort is the most important topic in Sorting. Revise Time Complexity of Quick Sort, Median of Medians algorithm. Practice these MCQs for Interviews.
Links (4): https://iq.opengenus.org/quick-sort/, https://iq.opengenus.org/time-and-space-complexity-of-quick-sort/, https://iq.opengenus.org/median-of-medians/, https://iq.opengenus.org/questions-on-quick-sort/
3. Hybrid Sorting Algorithm
The concept of Hybrid Sorting presents to the Interviewer that you understand how real-world algorithms are designed. There is no single algorithm that works best for all cases.
Links (1): https://iq.opengenus.org/hybrid-sorting-algorithms/
4. Radix Sort
Knowing a few Non-comparison based sorting algorithms is important and Radix Sort is a strong example. Analyze Time Complexity for Non-Comparison based Sorting algorithm.
Links (2): https://iq.opengenus.org/radix-sort/, https://iq.opengenus.org/time-complexity-for-non-comparison-based-sorting/
5. Sort on Linked List
Sorting on array and linked list are two different things. One may work well on array but not on Linked List and vice versa. Insertion sort on Linked List is a must.
Links (1): https://iq.opengenus.org/insertion-sort-linked-list/
---
Mathematical Algorithms
=======================
1. Analyze Algorithms
Having an overview of Mathematics for Analyzing Algorithms is a fundamental skill that you should have.
Links (1): https://iq.opengenus.org/mathematics-for-analyzing-algorithms/
2. Permutation
Permutation is a HOT interview questions. Problems like K-th permutation, Lexicographical Next Permutation, Heap's algorithm for generating permutations and Counting derangements are must practice problems.
Links (4): https://iq.opengenus.org/k-permutation-of-first-n-integers/, https://iq.opengenus.org/lexicographical-next-permutation/, https://iq.opengenus.org/heaps-algorithm-for-generating-permutations/, https://iq.opengenus.org/counting-derangements/
3. N-th root of a number
There are 3 mainstream algorithms to find the N-th root of a number which everyone should have an idea of. You can also use Binary Search to find Square Root and Cube Root of a number.
Links (4): https://iq.opengenus.org/n-th-root-of-number/, https://iq.opengenus.org/binary-search-algorithm/, https://iq.opengenus.org/square-root-of-number/, https://iq.opengenus.org/cube-root-using-binary-search/
4. Regula Falsi Method
Regula Falsi Method and Newton Raphson Method are used to find root of a Polynomial.
Links (2): https://iq.opengenus.org/regula-falsi-method/, https://iq.opengenus.org/newton-raphson-method/
5. Find GCD
Binary GCD algorithm or Stein's algorithm is the most basic algorithm to find GCD of numbers efficiently. Euclidean Algorithm is an efficient alternative.
Links (2): https://iq.opengenus.org/binary-gcd-algorithm/, https://iq.opengenus.org/euclidean-algorithm-greatest-common-divisor-gcd/
6. Integer Factorization
There are multiple Integer Factorization Algorithms and Pollard's rho algorithm for factorization is a must.
Links (2): https://iq.opengenus.org/integer-factorization-algorithms/, https://iq.opengenus.org/pollards-rho-algorithm/
7. Generate 0 and 1
This is a HOT interview problem. Generate 0 and 1 with 25% and 75% probability using standard random functions.
Links (1): https://iq.opengenus.org/generate-0-and-1-with-25-and-75-probability/
8. Swap two numbers
This is a HOT MCQ interview problem. There are over 6 different techniques to swap two numbers.
Links (1): https://iq.opengenus.org/swap-two-variables/
---
String Algorithms
=================
1. Sub-strings of a string
This is more like a brute force approach but candidates fail to implement or design an algorithm to generate all sub-strings of a string. This will help you solve most standard problems.
Links (1): https://iq.opengenus.org/print-all-sub-strings/
2. Number of palindromic substrings
There are over 4 algorithms to find the Number of palindromic substrings in a string which involves use of Dynamic Programming and Modifed Manacher’s algorithm.
Links (1): https://iq.opengenus.org/number-of-palindromic-substrings/
3. Pattern Search
This is often asked in last Interview rounds at FAANG. KMP algorithm is the standard technique while Aho Corasick Algorithm helps you generalize the problem (asked frequently). Rabin-Karp Pattern Searching Algorithm is another efficient algorithm.
Links (3): https://iq.opengenus.org/knuth-morris-pratt-algorithm/, https://iq.opengenus.org/aho-corasick-algorithm/, https://iq.opengenus.org/rabin-karp-string-pattern-searching-algorithm/
4. String Matching
The concept of String Hashing and Rolling Hash is important in String Matching as it takes O(N) time to match a string but only O(1) time to match an integer. Shift OR algorithm for String Matching and String Matching using Bitset is a MUST for Interviews.
Links (4): https://iq.opengenus.org/string-hashing/, https://iq.opengenus.org/rolling-hash/, https://iq.opengenus.org/shift-or-algorithm-for-string-matching/, https://iq.opengenus.org/string-matching-using-bitset/
5. Sorted order of characters
The problem Alien Dictionary problem: Sorted order of characters is a HOT interview problem involving the concept of Topological Sort.
Links (2): https://iq.opengenus.org/alien-dictionary/, https://iq.opengenus.org/topological-sort-bfs/
---
Dynamic Programming
===================
1. Basic problems on DP
Standard DP problems that are common in Interviews are: Longest Geometric Progression, Calculate Binomial Coefficient and Coin Change Problem.
Links (3): https://iq.opengenus.org/longest-geometric-progression/, https://iq.opengenus.org/calculate-binomial-coefficient/, https://iq.opengenus.org/the-coin-change-problem/
2. Shortest Path with k edges
This is a HOT interview problem where DP is applied on Graph problem. Finding the Shortest Path with k edges and Number of paths with k edges with Dynamic Programming is a must practice.
Links (2): https://iq.opengenus.org/shortest-path-with-k-edges/, https://iq.opengenus.org/number-of-paths-with-k-edges/
3. Assembly Line Scheduling
Scheduling problems are HOT interview problems. Assembly Line Scheduling using DP is a must. Similarly, Weighted Job scheduling problem is a variant that is popular in Interviews.
Links (2): https://iq.opengenus.org/assembly-line-scheduling-dp/, https://iq.opengenus.org/weighted-job-scheduling/
4. Knapsack Problem
Knapsack Problem is one of the most common Interview problems. 0-1 Knapsack Problem is a variant that uses Dynamic Programming.
Links (1): https://iq.opengenus.org/0-1-knapsack-problem/
5. Box Stacking Problem
Box Stacking Problem is a common problem for FAANG interviews. A variant of this is asked in every 3 out of 4 interviews.
Links (1): https://iq.opengenus.org/box-stacking-problem/
6. Travelling Salesman Problem
Travelling Salesman Problem and its variants are frequently asked in Interviews. It involves DP and bitmasking concepts. This is NP-Complete problem.
Links (1): https://iq.opengenus.org/travelling-salesman-problem-dp/
---
Greedy Algorithms
=================
1. Activity Selection Problem
Activity Selection Problem is one of the important problems where Greedy Algorithm is the direct solution. A variant of this: Scheduling tasks to Minimize Lateness is a critical Interview problem.
Links (2): https://iq.opengenus.org/activity-selection-problem-greedy-algorithm/, https://iq.opengenus.org/scheduling-to-minimize-lateness/
2. Egyptian Fraction Problem
Egyptian Fraction Problem is an important Interview problem that lies at the intersection of Mathematical and Greedy Algorithms.
Links (1): https://iq.opengenus.org/egyptian-fraction-problem/
3. Fractional Knapsack Problem
Fractional Knapsack Problem is a variant of Knapsack Problems that can be solved using Greedy Algorithms.
Links (1): https://iq.opengenus.org/fractional-knapsack/
4. Largest Cube Formed
The problem of Largest Cube Formed by deleting digits is interesting because of Time Complexity Analysis which many may get wrong in Interviews. It is O(N1/3 logN logN).
Links (1): https://iq.opengenus.org/find-the-largest-cube-formed-by-deleting-minimum-digits-from-a-number/
5. Maximal Clique
Greedy Algorithms are also applied on Graph based problems. Finding Single Maximal Clique is a challenging Interview problem that is asked.
Links (1): https://iq.opengenus.org/greedy-approach-to-find-single-maximal-clique/
6. Fitting Shelves Problem
This problem of Fitting Shelves is HOT interview problem requiring Greedy Algorithm.
Links (1): https://iq.opengenus.org/fitting-shelves-problem/
---
Backtracking problems
=====================
1. Backtracking Algorithm for Sudoku
Solving Sudoku using Backtracking is a standard technique though the implementation strategy is challenging in an Interview setting.
Links (1): https://iq.opengenus.org/backtracking-sudoku/
2. 8 Queens Problem
Solving 8 Queens Problem using Backtracking is yet another important Interview problem. In similar chess setting, MCQs on number of possibilities of a given condition are asked frequently.
Links (1): https://iq.opengenus.org/8-queens-problem-backtracking/
3. Subset Sum Problem
Subset Sum Problem is a very common problem and many try to solve it using DP. Very few practice a variant where Backtracking is applied on Subset Sum Problem.
Links (1): https://iq.opengenus.org/subset-sum-problem-backtracking/
4. Knight's Tour Problem
In case of problems dealing with Chess, Backtracking is a potential technique. Solving Knight's Tour Problem is important for Interviews and involve Backtracking and Warnsdorff's algorithm.
Links (1): https://iq.opengenus.org/knights-tour-problem/
5. Word Break Problem
Word Break Problem is an important Interview problem that involve concepts like Backtracking and Dynamic Programming.
Links (1): https://iq.opengenus.org/word-break-problem/
---
Divide and Conquer
==================
1. Closest Pair of Points
Closest Pair of Points is the most important Interview Problem based on Geometry and uses the concept of Divide and Conquer to solve it.
Links (1): https://iq.opengenus.org/closest-pair-of-points/
2. Karatsuba Algorithm
Very few realize that there are algorithms that optimized fundamental operations like Multiplication. Karatsuba Algorithm uses the concept of Divide and Conquer to multiply two number efficiently.
Links (1): https://iq.opengenus.org/karatsuba-algorithm/
3. Floor in sorted array
Finding floor in sorted array is an easy problem that is asked in Interviews. Having a good hold on Binary Search is a must.
Links (2): https://iq.opengenus.org/floor-in-sorted-array/, https://iq.opengenus.org/binary-search-iterative-recursive/
4. Elements with difference K
Finding 2 elements with difference K in a sorted array is a fundamental problem that many get wrong.
Links (1): https://iq.opengenus.org/elements-with-difference-k-in-sorted-array/
5. Peak Element in an Array
The problem of finding Peak Element in an Array tests your understanding of Divide and Conquer technique.
Links (1): https://iq.opengenus.org/peak-element-in-array/
---
Decrease and Conquer
====================
1. Fake Coin Problem
Fake Coin Problem is the most frequently asked Interview Problem that involve the concept of Decrease and Conquer. Very few use this technique.
Links (1): https://iq.opengenus.org/fake-coin-problem/
2. Basics of Decrease & Conquer
Revise the basics of Decrease and Conquer along with overview of fundamental problems.
Links (1): https://iq.opengenus.org/decrease-and-conquer/
---
Graph Algorithms
================
1. Islands Problem
Number of Islands in MxN matrix (of 0 and 1) and Making A Large Island by changing one 0 to 1 are HOT interview problems. This involve the concept of BFS and DFS.
Links (2): https://iq.opengenus.org/number-of-islands/, https://iq.opengenus.org/making-a-large-island/
2. Transitive Closure Of A Graph
Transitive Closure Of A Graph using Graph Powering is a core concept that helps to solve several challenging interview problems.
Links (1): https://iq.opengenus.org/transitive-closure-graph-powering/
3. Dijkstra's algorithm
Dijkstra's algorithm will help you solve shortest path problems. Time Complexity of Dijkstra's algorithm is a HOT interview problem.
Links (2): https://iq.opengenus.org/dijkstras-algorithm-finding-shortest-path-between-all-nodes/, https://iq.opengenus.org/time-and-space-complexity-of-dijkstra-algorithm/
4. Topological Sort
Topological Sort is used to order nodes in a Graph linearly. There are multiple ways to implement Topological Sort like using BFS, using DFS and Kahn's Algorithm. Understand the applications to understand the potential.
Links (4): https://iq.opengenus.org/topological-sort-bfs/, https://iq.opengenus.org/topological-sorting-dfs/, https://iq.opengenus.org/kahns-algorithm-topological-sort/, https://iq.opengenus.org/applications-of-topological-sort/
5. Bridges in Graph
The problem of finding all bridges in a Graph is a hot Interview topic.
Links (1): https://iq.opengenus.org/find-all-bridges-in-graph/
6. Hamiltonian Path & Cycle (+ Eulerian)
The concept of Hamiltonian Cycle and Hamiltonian Path is critical for Interviews. Remember this is a NP-Hard problem but it is important to identify when an interview problem requires Hamiltonian Path (a path that goes through all nodes in the graph once).The alternative concept is Eulerian path which is a path that covers all edges in the graph. It can be found efficiently (not NP-Hard) using algorithms like Fleury's Algorithm.
Links (4): https://iq.opengenus.org/hamiltonian-cycle/, https://iq.opengenus.org/hamiltonian-path/, https://iq.opengenus.org/fundamentals-of-euler-path/, https://iq.opengenus.org/fleury-algorithm-finding-eulerian-tours-in-a-graph/
7. Count all paths
Finding all paths is a way to count the paths but there exists other optimal ways where we can find the the total count without finding the actual paths.
Links (1): https://iq.opengenus.org/count-paths-from-top-left-to-bottom-right-of-a-matrix/
8. Minimum Spanning Tree
The concept of Minimum Spanning Tree is important. Kruskal Minimum Spanning Tree Algorithm and Prim Minimum Spanning Tree Algorithm are two core algorithms to find MST. Several graph based problems can be solved easily using MST like the Water Distribution problem in a village.
Links (3): https://iq.opengenus.org/kruskal-minimum-spanning-tree-algorithm/, https://iq.opengenus.org/prim-minimum-spanning-tree-algorithm/, https://iq.opengenus.org/water-distribution/
---
Computational Geometry
======================
1. Number of integral points
This problem of finding the Number of integral points between two points is a basic Interview problem. This involves Pick's theorem. A variant is Number of Integral points inside a triangle.
Links (3): https://iq.opengenus.org/integral-points-between-two-points/, https://iq.opengenus.org/picks-theorem/, https://iq.opengenus.org/number-of-integral-points-inside-triangle/
2. Oriented area of a triangle
Oriented area of a triangle is an important Interview problem for Computational Geometry.
Links (1): https://iq.opengenus.org/oriented-area-of-triangle/
3. Furthest Pair of Points
Closest Pair of Points is a standard problem yet Furthest Pair of Points is becoming a common questions in Interviews. It involves Rotating Calipers method.
Links (1): https://iq.opengenus.org/furthest-pair-of-points/
---
Game Theory
===========
1. Game of Kayle
Game Theory problems are rare in Interviews but there are 2 concepts that are tested. Sprague-Grundy Theorem and Game of Kayle is one core concept.
Links (1): https://iq.opengenus.org/sprague-grundy-theorem-game-of-kayle/
---
Time Complexity Analysis
========================
1. Dynamic Array
Time Complexity Analysis of Dynamic Array is a HOT interview questions. Candidates are asked how it works better than standard Array.
Links (1): https://iq.opengenus.org/time-complexity-of-dynamic-array/
2. Multiplication
This is a tricky interview question. Many candidate think multiplication is a simple operation but it is not. Understanding the Time Complexity Analysis of Multiplication is important.
Links (1): https://iq.opengenus.org/time-complexity-of-multiplication/
3. Interpolation Search
Binary Search is a common theme among interviews and Time Complexity of Interpolation Search is a HOT follow-up question in such cases.
Links (1): https://iq.opengenus.org/time-complexity-of-interpolation-search/
---
Advanced problems
=================
1. Range Minimum query
The problem of Range Minimum query is common in advanced Interview rounds in FAANG. This can be solved using Segment Tree and Square Root Decomposition.
Links (2): https://iq.opengenus.org/range-minimum-query-segment-tree/, https://iq.opengenus.org/range-minimum-query-square-root-decomposition/
2. Distinct Elements
The problem of finding Number of Distinct elements in a range is a HOT interview problem. A follow-up interview question is to support single element updates.
Links (2): https://iq.opengenus.org/number-of-distinct-elements-in-given-range/, https://iq.opengenus.org/distinct-elements-in-range-query-with-single-element-updation/
3. Count inversions in array
This is another HOT interview problem in advanced rounds: Count inversions in an array. This is solved using the idea of Fenwick Tree.
Links (2): https://iq.opengenus.org/count-inversions-in-an-array-using-fenwick-tree/, https://iq.opengenus.org/fenwick-tree-range-product/
4. Longest Increasing Subsequence
The problem of Longest Increasing Subsequence is a standard problem that is solved using Binary Search and Dynamic Programming. The challenge is to use Fenwick Tree to solve LIS problem. 2 follow-up questions are to find Longest Common Increasing Subsequence and Longest Increasing Consecutive Subsequence.
Links (4): https://iq.opengenus.org/longest-increasing-subsequence/, https://iq.opengenus.org/longest-increasing-subsequence-fenwick-tree/, https://iq.opengenus.org/longest-common-increasing-subsequence/, https://iq.opengenus.org/longest-increasing-consecutive-subsequence/
---
Generated by OpenGenus. Updated on 2023-12-28