← Playground

Sorting Visualizer

royhp.com
Comparisons 0 Array accesses 0 Complexity Θ(n²) · O(1) Status Sorting…
Comparing Swap / write Pivot / key Sorted

Pick an algorithm and watch it sort a freshly shuffled array. Changing the algorithm re-runs the same data so you can compare them head to head; Shuffle or the Size slider deal a new array. Bars glow by what the algorithm is touching, and with Sound on, each touched value beeps at a pitch set by its height.