Problem Solving

DSA & PROBLEM SOLVING

How I Cracked an SDE Role at Amazon from a Tier 3 College: My Problem-Solving Framework

I wasn’t from a top college. I didn’t have the best resources or guidance. But I still managed to crack an SDE role at Amazon.

And no—it wasn’t because I solved thousands of problems blindly. The real reason was that I changed how I think while solving problems.

In this article, I’ll share the step-by-step problem-solving framework that helped me go from confused to confident in DSA.

Problem-solving framework for DSA and coding interviews

🧩 The Real Problem Most Students Face

Most students struggle with Data Structures and Algorithms (DSA) not because they aren’t smart, but because their problem-solving approach needs work.

  • Jumping straight into coding.
  • Not fully understanding the problem.
  • Following random patterns without clarity.
  • Never reflecting on mistakes.

This leads to frustration, confusion, and slow progress. I was stuck in the same cycle until I fixed my approach.

The shift: Stop measuring progress only by the number of problems solved. Start paying attention to how you understand, approach, and learn from each problem.

🚀 My Problem-Solving Framework

Here is the six-step system I followed. Each step helps make the next one easier, from understanding the question to learning from the final solution.

01

Define the Problem Clearly

Before writing a single line of code, make sure you understand exactly what you need to solve.

  • What is the input?
  • What is the expected output?
  • What are the constraints?

If you skip this step, you can easily head in the wrong direction.

02

Break It Into Smaller Parts

Instead of trying to solve everything at once, divide the problem into smaller, manageable steps.

This makes complex problems easier to reason about and reduces the feeling of being overwhelmed.

03

Think of Multiple Approaches

Don’t stop at the first solution that comes to mind. Train yourself to explore different possibilities.

  • Is there a better way?
  • Can the solution be optimized?
  • Is there a known pattern that applies?

Comparing approaches helps you move from brute force toward more efficient solutions.

04

Evaluate and Choose

Once you have multiple ideas, compare them before deciding which one to implement.

  • Time complexity
  • Space complexity
  • Simplicity and practicality

Choose an approach that meets the problem’s requirements without unnecessary complexity.

05

Implement the Solution

Now comes the coding.

When your logic is clear, implementation becomes easier to organize, test, and debug.

Translate your chosen approach into code and verify it against examples and edge cases.

06

Reflect and Learn

This is where meaningful improvement happens. After solving a problem, review your thinking instead of immediately moving to the next one.

  • Why did I approach it this way?
  • Did I truly understand the solution?
  • What mistake did I make?
  • What pattern or lesson did I learn?
  • How can I solve similar problems better?
↻

Repeat the Learning Cycle

Problem solving doesn’t end when your code passes the test cases. Understanding why a solution works—and how you arrived at it—helps you recognize similar patterns in future problems.

🧠 My DSA Thinking System

While practicing, I divided my reflection into two cases: problems I could solve and problems I couldn’t. Both situations offered something valuable to learn.

✓ WHEN I SOLVED IT

Understand What Worked

Solving a problem correctly doesn’t automatically mean I fully understood it. I examined how I arrived at the solution.

  • What made me think of this approach?
  • Did I recognize a familiar pattern?
  • Did a hint or preview of the solution help me?
  • Did I figure it out independently?
  • Had I solved a similar problem before?
  • What lesson or pattern can I take away?
My reflection goal

Identify what helped me succeed so I can recognize and apply that reasoning again.

↗ WHEN I GOT STUCK

Understand What Was Missing

Instead of treating failure as a dead end, I tried to understand why I couldn’t find the right approach.

  • Why couldn’t I think of a suitable approach?
  • What helped the solution author find the right direction?
  • What was missing from my reasoning?
Diagnose the gap
  1. Did I lack knowledge of a topic or pattern?
  2. Was my coding or implementation weak?
  3. Was I missing a logical step or thinking clearly?

This helped me identify weaknesses and decide what to practice next.

Important: If you need a hint or look at a solution, that doesn’t make your practice worthless. The important part is understanding what you missed and trying to reproduce the reasoning yourself afterward.

⚠️ Common Mistakes I Made

Recognizing these mistakes helped me improve my problem-solving approach. You may recognize some of them in your own practice, too.

  1. Sticking to One Approach Too Quickly The first idea isn’t always the best one. Consider alternatives before committing.
  2. Trusting Intuition Without Understanding A solution that works once is not enough. Understand why it works and when it applies.
  3. Misunderstanding the Problem Missing a constraint or edge case can send an otherwise good solution in the wrong direction.
  4. Struggling With Recursion-Based Problems Recursion becomes easier to reason about when you understand the base case, recursive step, and how smaller subproblems combine.
THE BIG TAKEAWAY

Solving more problems is not enough.

Improving your thinking process matters just as much. Focus on understanding the problem, exploring possible approaches, evaluating trade-offs, and learning from every attempt.

🎯 Final Thoughts

If you’re preparing for coding interviews or placements, don’t just practice blindly. Make every problem an opportunity to improve how you think.

Focus on three things:

  • Understanding problems deeply before coding.
  • Thinking through multiple approaches before choosing one.
  • Reflecting after every problem, whether you solved it or not.

You don’t need to get everything right on the first attempt. You need to understand your mistakes and gradually build a stronger problem-solving process.

Keep Learning. Keep Improving.

Want to strengthen your DSA and problem-solving skills? Follow EasyLearnCode for more learning resources, coding insights, and interview preparation content.

✈ Telegram in LinkedIn ▶ YouTube ◎ Instagram

Let’s grow together. 🚀

Share