Algorithm Visuals

Watch algorithms run, line by line.

Pick a classic problem, choose a test case and press play. The reference solution steps through in 3D while the line it's executing lights up.

8 problems · 24 test cases · free, no sign-up

The Binary Search visualizer mid-run: bars for each value, pointers lo, mid and hi below them, and the solution code with the executing line highlighted.
Binary SearchTarget in the middle

Compare nums[4] = 16 with 23

step 10 / 33
function binarySearch(nums: number[], target: number): number {
  let lo = 0;
  let hi = nums.length - 1;
  while (lo <= hi) {
    const mid = Math.floor((lo + hi) / 2);
    if (nums[mid] === target) {
      return mid;
    }
    if (nums[mid] < target) {
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
  }
  return -1;
}

From statement to solution in four steps.

  1. 1. Read the problem

    A plain-language statement with worked examples.

  2. 2. Pick a test case

    Each problem ships several, from tiny inputs to tricky edge cases.

  3. 3. Press play

    Space plays or pauses; the arrow keys step; Home and End jump.

  4. 4. Follow the line

    The running line is highlighted, and recursive calls stack up beside it.

Every line, lit as it runs.

The code sits next to the scene, and the line being executed is highlighted at every step, with a plain-English note on what just happened.

  • Step forward and back at your own pace
  • Narration written into each solution
  • Syntax highlighting in light and dark

Recursion, frame by frame.

Recursive solutions show their call stack as it grows and unwinds, so you always know which call you're in and where it will return.

  • The current frame is highlighted
  • Arguments shown for every call
  • Caller lines stay marked in the code

Arrays, grids, trees and graphs.

Each data structure gets its own 3D view: bars for arrays, tiles for DP tables, and laid-out nodes for trees and graphs.

  • Pointers and comparisons drawn in place
  • Orbit, zoom and pan the scene
  • Works with touch on phones and tablets
  • Arrays

  • Grids and DP tables

  • Trees

  • Graphs

Recorded, not simulated.

Every step you see was recorded by running the real TypeScript solution when the site was built. Your browser only plays the trace back: fast, deterministic and gentle on your battery.

problems
8
traced test cases
24
structure kinds
5
sign-ups
0

Frequently asked questions

Is it free?

Yes. There's no account, no sign-up and nothing to install.

What language are the solutions in?

TypeScript. Each one is a short, readable reference solution, the kind you'd write in an interview.

Can I run my own code?

No. Every step was recorded from the reference solution when the site was built; the browser plays that recording back and never executes solution code.

Does it work on my phone?

Yes. The layout adapts to phones and tablets, and the 3D view supports drag and pinch.

What are the keyboard shortcuts?

Space plays and pauses, ← and → step back and forward, and Home and End jump to the first or last step.

Pick a problem. Press play.

Start with Binary Search, or browse the full list.