Challenge Questions
Questions from Blind 75 Questions tagged FaceBook/Meta Questions tagged Amazon Questions
tagged Google
Pattern 1: Sliding Window In many problems dealing with an array (or a LinkedList), we are asked
to find or calculate something among all the contiguous subarrays (or sublists) of a given size...
(Full content preserved as provided)
Pattern 2: Two Pointer In problems where we deal with sorted arrays (or LinkedLists)...
Pattern 3: Fast & Slow pointers The Fast & Slow pointer approach, also known as the Hare &
Tortoise algorithm...
Pattern 4: Merge Intervals This pattern describes an efficient technique to deal with overlapping
intervals...
Pattern 5: Cyclic Sort This pattern describes an interesting approach to deal with problems
involving arrays containing numbers in a given range...
Pattern 6: In-place Reversal of a LinkedList In a lot of problems, we are asked to reverse the links
between a set of nodes of a LinkedList...
Pattern 7: Tree Breadth First Search This pattern is based on the Breadth First Search (BFS)
technique to traverse a tree...
Pattern 8: Depth First Search (DFS) This pattern is based on the Depth First Search (DFS)
technique to traverse a tree...
Pattern 9: Two Heaps In many problems, where we are given a set of elements such that we can
divide them into two parts...
Pattern 10: Subsets A huge number of coding interview problems involve dealing with Permutations
and Combinations...
Pattern 11: Modified Binary Search Whenever we are given a sorted Array or LinkedList...
Pattern 12: Bitwise XOR XOR is a logical bitwise operator...
Pattern 13: Top 'K' Elements Any problem that asks us to find the top/smallest/frequent K
elements...
Pattern 14: K-way merge This pattern helps us solve problems that involve a list of sorted arrays...
Pattern 15: 0/1 Knapsack (Dynamic Programming) 0/1 Knapsack pattern is based on the famous
problem...
Pattern 16: Topological Sort (Graph) Topological Sort is used to find a linear ordering of elements...