Description
Coding interviews are becoming increasingly difficult. Brushing up on key data structures and going through 50-75 coding interview questions was more than enough preparation for an interview a few years ago. Today, everyone has access to massive sets of increasingly complex coding questions. Overall, the process has become more competitive. When our team sat down to brainstorm ways to make the interview process easier for candidates, we quickly realised that one skill in particular helped us the most when preparing for coding interviews: "the ability to map a new problem to an already known problem."
To assist candidates, we've created a list of 16 patterns for coding questions based on similarities in the techniques required to solve them. As a result, once you've learned a pattern, you'll be able to use it to solve dozens of problems.
Syllabus :
1. Pattern: Sliding Window
- Maximum Sum Subarray of Size K
- Smallest Subarray with a given sum
- Longest Substring with maximum K Distinct Characters
- Fruits into Baskets
- No-repeat Substring
- Longest Substring with Same Letters after Replacement
- Longest Subarray with Ones after Replacement
2. Pattern: Two Pointers
- Pair with Target Sum
- Remove Duplicates
- Squaring a Sorted Array
- Triplet Sum to Zero
- Triplet Sum Close to Target
- Triplets with Smaller Sum
- Subarrays with Product Less than a Target
- Dutch National Flag Problem
3. Pattern: Fast & Slow pointers
- LinkedList Cycle
- Start of LinkedList Cycle
- Happy Number
- Middle of the LinkedList
4. Pattern: Merge Intervals
- Merge Intervals
- Insert Interval
- Intervals Intersection
- Conflicting Appointments
5. Pattern: Cyclic Sort
- Cyclic Sort
- Find the Missing Number
- Find all Missing Numbers
- Find the Duplicate Number
- Find all Duplicate Numbers
6. Pattern: In-place Reversal of a LinkedList
- Reverse a LinkedList
- Reverse a Sub-list
- Reverse every K-element Sub-list
7. Pattern: Tree Breadth First Search
- Binary Tree Level Order Traversal
- Reverse Level Order Traversal
- Zigzag Traversal
- Level Averages in a Binary Tree
- Minimum Depth of a Binary Tree
- Level Order Successor
- Connect Level Order Siblings
8. Pattern: Tree Depth First Search
- Binary Tree Path Sum
- All Paths for a Sum
- Sum of Path Numbers
- Path With Given Sequence
- Count Paths for a Sum
9. Pattern: Two Heaps
- Find the Median of a Number Stream
- Sliding Window Median
- Maximize Capital
10. Pattern: Subsets
- Subsets
- Subsets With Duplicates
- Permutations
- String Permutations by changing case
- Balanced Parentheses
- Unique Generalized Abbreviations
11. Pattern: Modified Binary Search
- Order-agnostic Binary Search
- Ceiling of a Number
- Next Letter
- Number Range
- Search in a Sorted Infinite Array
- Minimum Difference Element
- Bitonic Array Maximum
12. Pattern: Bitwise XOR
- Single Number
- Two Single Numbers
- Complement of Base 10 Number
13. Pattern: Top 'K' Elements
- Top 'K' Numbers
- Kth Smallest Number
- 'K' Closest Points to the Origin
- Connect Ropes
- Top 'K' Frequent Numbers
- Frequency Sort
- Kth Largest Number in a Stream
- 'K' Closest Numbers
- Maximum Distinct Elements
- Sum of Elements
- Rearrange String
14. Pattern: K-way merge
- Merge K Sorted Lists
- Kth Smallest Number in M Sorted Lists
- Kth Smallest Number in a Sorted Matrix
- Smallest Number Range
15. Pattern : 0/1 Knapsack (Dynamic Programming)
- 0/1 Knapsack
- Equal Subset Sum Partition
- Subset Sum
- Minimum Subset Sum Difference (hard)
16. Pattern: Topological Sort (Graph)
- Topological Sort
- Tasks Scheduling
- Tasks Scheduling Order
- All Tasks Scheduling Orders (hard)
- Alien Dictionary
17. Miscellaneous
- Kth Smallest Number (hard)