I found Educative: Interactive Courses for Software Developers is a good one. They offered several courses for coding interviews, among others. What I like most is that they would tell you in and out of these coding questions. And they break questions into different groups, patterns, as they say.
For example, in their Grokking the Coding Interview: Patterns for Coding Questions, they have patterns like:
- Sliding window, to solve a group of questions like Longest Substring with K Distinct Characters (medium).
- 2 points to solve 3-sum problem.
- Fast & Slow pattern to solve Middle of the LinkedList (easy),
LinkedList Cycle (easy). - Merge Intervals: Merge Intervals (medium).
- Cyclic Sort: Find the Duplicate Number (easy).
- In-place Reversal of a LinkedList: Reverse a LinkedList (easy).
- Tree Breadth First Search: Binary Tree Level Order Traversal (easy).
- Pattern: Tree Depth First Search: Binary Tree Path Sum (easy).
- Two Heaps: Find the Median of a Number Stream (medium).
- Subsets: Subsets With Duplicates (easy).
- Modified Binary Search: Ceiling of a Number (medium).
- Top 'K' Elements: Top 'K' Numbers (easy).
- K-way merge: Merge K Sorted Lists (medium).
- 0/1 Knapsack (Dynamic Programming): Equal Subset Sum Partition (medium).
- Topological Sort (Graph): Alien Dictionary (hard).
In their Grokking Dynamic Programming Patterns for Coding Interviews course, they break problems into:
- 0/1 Knapsack: Subset Sum.
- Unbounded Knapsack: Coin Change.
- Fibonacci Numbers: Staircase.
- Palindromic Subsequence: Longest Palindromic Subsequence
- Longest Common Substring: Longest Common Subsequence, Edit Distance, among others.
Usually, the author would go through the questions and solve them with 1. Pure recursion, 2. Top-Down memoization, 3. Bottom-Up table filling techniques. This is great since we practice three ways of problem solving at a time.
I was trying grinding LeetCode for the past year, but that was kind of intimidating, since there are more than 1000 questions there now. So we need to do the preparation in a different way.
The above two courses helped me the most to prepare coding interviews. Of course, you will find their System design, and OOD courses there as well.
Happy learning and coding!