alg

Algorithms

An interactive algorithms lab I built to turn textbook ideas into replayable, inspectable traces. Browse the catalog, jump into a focused scenario, and open a dedicated visualizer page when you want the full chart, canvas, and controls.

curated presetsdedicated visualizer pagesinteractive walkthroughs

mobile tips

The catalog is lighter on mobile now. Open a dedicated algorithm page when you want the full visualizer experience.

Inside the visualizer, rotate for wider charts and swipe left or right to move between steps.

algorithm catalog

Choose a lane, open a curated demo, then jump into a dedicated visualizer page when you want the chart or canvas.

showing 11 algorithms

filter

group

sorting

6 algorithms
sortingbeginnerO(n²)

Bubble Sort

Repeatedly swaps adjacent out-of-order values so larger numbers drift to the end.

best for

Use it mainly for learning and for discussing loop invariants, not for production sorting.

tradeoff

Too slow for large datasets.

sortingbeginnerO(n²)

Selection Sort

Selects the minimum value from the unsorted suffix and places it into the next sorted slot.

best for

Useful when swaps are expensive but comparisons are cheap, or when teaching simple in-place sorting.

tradeoff

Not stable in its usual form.

sortingbeginnerO(n²)

Insertion Sort

Builds a sorted prefix by inserting each new value into the right gap.

best for

Use for small datasets, nearly sorted data, or as a base case inside more advanced sorts.

tradeoff

Shifts can make it slow on long random arrays.

sortingintermediateO(n log n)

Merge Sort

Recursively splits the array and merges sorted halves into a fully ordered result.

best for

Use when stable ordering matters and extra memory is acceptable for consistent performance.

tradeoff

Needs extra memory for merging.

sortingintermediateO(n²)

Quick Sort

Partitions the array around a pivot and recursively sorts the resulting partitions.

best for

Use when average-case speed and in-place behavior matter more than stability.

tradeoff

Worst-case time degrades to O(n²).

sortingadvancedO(n log n)

Heap Sort

Builds a max heap and repeatedly extracts the root to produce a sorted suffix.

best for

Use when you want in-place O(n log n) performance with strong worst-case guarantees.

tradeoff

Not stable.

searching

2 algorithms

graphs

3 algorithms

visual modes

Sorting algorithms use bar charts. Search algorithms use index cards. Graph algorithms switch to a node-link canvas on their dedicated pages.