Trace each move
Run code in a focused sandbox and move through every useful state at your own pace.

Practice algorithms visually
A code visualizer for understanding what an algorithm is doing, one state at a time.
Built for interview practice
Run code in a focused sandbox and move through every useful state at your own pace.
Arrays, hash maps, windows, stacks, queues, graphs, and recursive call stacks stay visible.
Paste JavaScript or TypeScript, add JSON input, and get an inferred trace without writing custom visualization code.
Sign in to save named solutions by topic, then return to them whenever you want to practice.
See it in action
Five live demos, one per family — sorting, searching, trees, hashing, and recursion. Each one plays the real visualizer: bubble sort swaps values into place, binary search narrows its window, Invert Binary Tree mirrors a tree, Two Sum builds a hash map, and fibonacci grows and unwinds its recursive call stack.
Copy the input array
lo = 0, hi = 6 — the search space is the whole array
Start at the root — invertTree(4)
seen = {} — no numbers remembered yet
Start the trace: call fib(5)
Paste an algorithm and provide JSON input.
Run the trace to infer changes in variables and data structures.
Step forward, back, or play the animation while the active line stays in focus.
DSA Lab exists for one reason: to help students and learners actually understand algorithms — by watching every step, not just memorizing the answer. It's free, and it's made with that goal in mind.
One honest note: visualizations are generated from real code traces, and we check them against known answers — but no tool is perfect. If a step ever looks wrong or confusing, it probably is. Tell us and we'll fix it.