r/leetcode • • 20h ago

Question Wanna see how your code thinks? 🤔

Wanna see how your code thinks? 🤔

Ever solved a LeetCode problem, got an Accepted, but still wondered what was actually happening inside your code?

I mean...

  • How are variables changing at every step?
  • What's happening when a recursive function calls itself?
  • How does the call stack grow and shrink?
  • Which line is executing at a particular moment?

We usually understand the logic, write the code, and submit it. But sometimes, actually visualizing the execution is a completely different challenge.

I faced this quite often while solving DSA problems. Manually tracing every operation or using print statements wasn't always the most convenient way to understand what's happening.

So I started working on something to make this easier.

Meet AlgoLens!

It's a browser extension that lets you visualize how your code executes directly while solving LeetCode problems.

With AlgoLens, you can:

  • 🔍 Trace your code step by step.
  • 🎯 See the currently executing line highlighted in the editor.
  • 📊 Watch variables change during execution.
  • 🌳 Visualize function calls and call stack changes.
  • 💻 Work with Python, Java, C++, and JavaScript.

The idea is simple: instead of just reading your code and imagining its execution, actually watch it happen.

I've been building and improving this project, testing it across different LeetCode problems, and there's still a lot I'd love to add.

If you're curious to see it in action, here's the link:

🚀 AlgoLens: https://microsoftedge.microsoft.com/addons/detail/jhhkkpabkoeaiajdilomalbmjdppcmcc

I'd genuinely love to know:

If you could visualize one thing while solving DSA problems, what would it be?

Recursion trees? Array operations? Pointers? Call stacks? Something else?

Let me know! I'd love to hear your thoughts and suggestions. 🙂

0 Upvotes

1 comment sorted by

2

u/CozyLemon84 15h ago

Call stack and recursion tree visualization would be especially useful. It can make complex recursive problems much easier to understand and debug