r/leetcode • • 20d 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

2 comments sorted by

2

u/CozyLemon84 19d ago

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

1

u/SquashHot4348 17d ago

This is some really thoughtful feedback! Thanks for taking the time to explain it in such detail.

Actually, AlgoLens already has a call-tree and memory visualization in its side panel. You can also click on a variable to jump directly to the corresponding point in its execution, making it easier to understand how and when its value changes.

I really like your suggestions around shared object identity, mutation history across recursive frames, and jumping directly to previous mutations. These are interesting directions for making the visualizations even more useful.

I'm also working on another usability update that's coming soon, which should make the overall experience more convenient.

Really appreciate the suggestions! Feedback like this helps me think beyond just tracing lines of code and focus on making execution easier to understand.

Please click below for reference 👇
Video for reference