How to study algorithms independently
Learn how to avoid common pitfalls in practicing algos, debug effectively, and use Leetcode the right way to build real problem-solving skills.
Too many engineers fall into the trap of solving endless problems without real progress.
Churning through algorithms and chasing hard problems won’t make you better. To truly improve your problem-solving skills, you need a structured and intentional strategy for learning.
Here’s how to build a strong foundation for technical interviews and real-world problem-solving.
The key to learning algorithms: deliberate practice
It’s possible to grind through 100 algorithms and not be any better than when you started — or improve exponentially — depending on how you approach the problems. The difference comes down to deliberate practice: a structured, intentional way of learning that goes beyond just grinding through problems.
A lot of people mistake repetition for progress. They assume that solving more problems automatically makes them better, but without a focused approach, they’re just reinforcing the same mistakes. Deliberate practice is different. It means tackling problems with a plan, analyzing what’s tripping you up, and adjusting your approach based on what you learn.
Think of it like strength training. You'll plateau if you lift the same weights the same way every time. To build strength, you need progressive overload — gradually increasing the challenge and refining your technique. Problem-solving works the same way. Solving problems isn't enough; you need to engage deeply, identify weak spots, and push yourself beyond your comfort zone.
What you should avoid
When studying algorithms, avoid these common pitfalls:
- Jumping into coding without a plan. Writing code without a structured approach leads to frustration and wasted time.
- Writing test cases after coding. You need to think about edge cases before writing code.
- Debugging only with print statements. While useful, relying solely on print debugging limits your ability to reason about your code.
- Mindlessly running built-in test suites. Passing tests doesn’t mean your code is correct or well-structured.
- Making arbitrary changes, hoping something works. This trial-and-error approach won’t help you in an interview.
- Focusing only on speed. Speed comes after mastery, not before.
- Working backward from the solution. Understanding why a solution works is more important than just memorizing it.
- Solving as many problems as possible. Depth is more valuable than sheer volume.
What you should do instead
To maximize learning, follow these best practices:
- Write detailed pseudocode before coding. Clarify your thought process and break down the problem before jumping into implementation.
- Identify happy and edge cases first. Testing should guide your coding, not the other way around.
- Manually walk through examples line by line. Track variable changes and validate logic before running code.
- Identify where your approach diverges from expected behavior. This is key to debugging and refining your problem-solving approach.
- Spend sufficient time on each algorithm. Rushing through problems leads to shallow understanding.
- Try multiple approaches and verify with solutions. Understanding different methods enhances your flexibility in solving problems.
- Reflect before moving on. Ask yourself: What went well? What went wrong? Why?
Debugging is your #1 skill
You will never know every algorithm, and you will always make mistakes. Debugging is the skill that will set you apart. Strong debugging habits ensure that you can systematically break down and correct errors, even for unfamiliar problems.
Using time limits helps structure your study sessions. Here’s how:
- Solve on your own within the minimum time frame.
- This step is about speed. Attempt to solve the problem without outside help.
- If you succeed within this time, you are at interview-level performance.
- Once you hit the minimum time, slow down and focus on depth.
- If you get stuck, refer to solutions or write-ups.
- Intentionally slow down to fully understand the solution.
- If you're struggling to even start, watch solution videos before coding.
- After referring to a solution, start from scratch.
- Don’t copy and paste. Write fresh pseudocode, manually run examples, and rethink the approach.
- If you're still struggling past the maximum time, ask for help.
- Discuss in forums or with peers to get unstuck.
- You may need to revisit foundational concepts before retrying.
Using Leetcode the right way
It’s likely that your goal is to be a better software engineer. If that is the case, be careful about what you’re taking away from Leetcode. It’s a powerful tool, but like any tool, it needs to be used with the right intent.
Different people use Leetcode for different reasons:
- Academics use it to create the most optimal time and space solution with math and computer science.
- Competitors use it to type an optimal solution as fast as possible.
- Software engineers use it to improve their problem-solving skills for interviews.
Knowing why you're using Leetcode helps you extract the most relevant insights.
Prioritize well-explained, structured solutions over hyper-optimized, unreadable code. Avoid relying on misleading speed metrics like "faster than X% of users" — interviewers care more about how you analyze and explain your approach rather than raw execution time.
Discipline yourself when using Leetcode. The platform allows unlimited retries, which makes it easy to fall into the trap of brute-forcing problems without learning from them.
To actually improve:
- Slow down and analyze the problem before jumping into code.
- Develop a structured plan—think through different approaches and trade-offs.
- Study high-quality explanations when stuck, then try solving the problem again from scratch.
By treating Leetcode as a learning tool rather than a numbers game, you’ll build a deeper understanding of algorithms, improve your interview performance, and become a stronger problem solver overall.
Tips for successful learning:
1. Set quantitative goals
It’s completely normal to need multiple attempts before getting a problem right, but the goal is to improve over time. Track how often you need to compile and debug before reaching a correct solution, and work toward reducing errors with each session. Seeing clear progress not only sharpens your skills but also boosts your confidence.
2. Employ progressive overload
Start with simpler problems and push yourself to tackle progressively harder ones. This challenges your brain to adapt and expand your problem-solving abilities. Since technical interviews usually last 45 minutes, practice solving problems within that window—but don’t stop there. Work on more complex problems that take longer, so when the time comes, the standard ones feel easy.
3. Maintain focus
Solving problems over and over without thinking leads to burnout, not improvement. Deliberate practice matters more than raw hours. Work through problems methodically, analyze your mistakes, and take structured breaks if your focus starts slipping. Research shows that short breaks improve retention and problem-solving skills — so a focused 90-minute session will be far more effective than three hours of distracted practice.
4. Get feedback
Self-assessment is key to improvement. After solving a problem, reflect on what worked and where you struggled. Keep a simple log of recurring mistakes to spot patterns. Even better, get feedback from peers, mentors, or online communities. A fresh perspective can highlight blind spots and help you refine your approach faster.
Get holistic interview prep with Formation
The Formation Fellowship gives mid-level and senior engineering job seekers everything they need to land their dream roles—including personalized skill brush-ups, resume help, unlimited mock interviews with experienced software engineers and hiring managers from top-tier tech companies, career and negotiation support, and more.
If you’re having trouble navigating your job search on your own, apply here and get unconditional support from a team of engineering mentors, technical recruiters, career coaches, and more.