Sorting visualizer
Watch bubble, selection, insertion, merge, quick, heap and shell sort work step by step, with live counts and complexity.
- TypeScript
- Algorithms
- Data structures
loading tool…
Watch bubble, selection, insertion, merge, quick, heap and shell sort work step by step, with live counts and complexity.
loading tool…
ready
Picks a pivot, moves smaller values to its left and larger to its right, then sorts each side. Usually the fastest in practice.
| algorithm | comparisons | swaps / writes | relative work |
|---|---|---|---|
| 1,128 | 641 | ||
| 1,128 | 45 | ||
| 682 | 641 | ||
| 210 | 272 | ||
| least work | 329 | 131 | |
| 381 | 221 | ||
| 322 | 155 |