How to Stop Solving Thousands of LeetCode Problems and Organize Algorithms into 30 Patterns
Sound familiar: you open LeetCode, see a list of three thousand problems, solve five in a row, and realize your head is a mess. A week later you sit down for a similar problem and again don't know where to start. Most people try to wear down algorithmic interviews by memorizing specific solutions by heart. But rote learning falls apart on the very first non-standard phrasing from the interviewer.
Recently I stumbled upon an open course called Babua DSA Patterns in the team- codebug repository. The project author, a developer going by CTO Bhaiya (Anuj Kumar, who has worked at Adobe and Intuit), proposes a different approach. Instead of chaotically solving hundreds of problems, he structured the entire preparation into 90 days and centered it around 30 core patterns.
The essence of the pattern-based approach
Once you start working through problems by the dozen, you notice one thing. Nine out of ten interview questions boil down to a limited set of techniques.
For example, if you need to find a substring with a specific condition or a pair of elements in a sorted array, you almost certainly need two pointers or a sliding window. Once you understand the mechanics of a pattern, the specific wording of a problem stops being intimidating. You stop searching for a unique solution and simply adapt a familiar code skeleton.
In the repository, the author builds exactly this coordinate system:
- Each pattern is explained from an intuition standpoint, not dry theory
- Every template comes with 15–20 practice problems of increasing difficulty
- There are ready-made notes and boundary case analysis guides
- Spaced repetition tables are included
How the repository and study plan are organized
The repository serves as an interactive tracker for a 90-day challenge. The learning process itself is broken down by day. Each day is dedicated either to exploring a new concept or to practicing problems on a topic already covered.
The directory structure is straightforward: each day gets its own folder (0_Day, 1_Day, 2_Day, and so on), containing notes, code walkthroughs, and video links.
The author accompanies topics with visual diagrams:
Among the patterns covered are basic and advanced topics:
- Two Pointers (classic two pointers for arrays and strings)
- Fast & Slow Pointers (tortoise and hare technique for cyclic structures and linked lists)
- Sliding Window (fixed and dynamic size sliding window)
- In-place linked list reversals
- K-element search via heaps
- Modified binary search
Example: from idea to two pointers template
To understand how the logic is built, let's take the Two Pointers pattern. Many array problems can be solved head-on in O(n²) using nested loops. Using pointers moving toward each other or in the same direction reduces complexity to O(n).
Here's what the skeleton of this approach looks like in Java:
public int[] twoSumSorted(int[] numbers, int target) {
int left = 0;
int right = numbers.length - 1;
while (left < right) {
int currentSum = numbers[left] + numbers[right];
if (currentSum == target) {
return new int[] { left + 1, right + 1 };
} else if (currentSum < target) {
left++; // сдвигаем левый указатель вправо, увеличивая сумму
} else {
right--; // сдвигаем правый указатель влево, уменьшая сумму
}
}
return new int[] {};
}
In the course, the author shows how this same template with minimal modifications applies to palindrome checking, the 3Sum problem, or finding the container with the most water. Instead of keeping five different solutions in your head, you hold one pattern and the rules for pointer movement.
Spaced repetition and tracking
One of the common problems when preparing for interviews is forgetting. You might work through segment trees in March, and by May completely erase the traversal details from memory.
The project has a separate revision table (Revision Sheet) for this. The author recommends the four-times rule for repeating each topic with increasing intervals. To track progress, you're encouraged to fork the repository and mark completed days right in your own profile.
The fly in the ointment: nuances worth knowing
Before jumping into the 90-day marathon, pay attention to the format of the materials:
- The main language of YouTube video lessons is a mix of Hindi and English (Hinglish). If you only absorb information in pure Russian or academic English, watching the videos will be somewhat tough.
- The codebase and text notes in the repository are written in Java and English, so you can read the notes without any problems even without the videos.
- The project is focused on practical interview results, so there are no deep academic proofs of asymptotics here.
Who this repository is useful for
If you're preparing for a job change, planning to go through technical interviews at big tech, or just want to bring order to your algorithmic knowledge base, the babua-dsa- patterns- course repository is an excellent choice as a framework.
You don't have to follow the 90-day schedule day by day. It's enough to take the list of 30 patterns, look into the corresponding folders in the repository for problem breakdowns, and solve a set on LeetCode in your main working language. This systematic approach saves weeks of chaotic wandering through problem archives.
関連プロジェクト