Sorting Algorithm Visualizer
Visualize bubble, selection, insertion, merge, and quick sort with step mode, speed control, and live compare/swap/write counters
Algorithm
Comparisons0
Swaps0
Writes0
Step Progress0 / 0
Compare
Swap
Write
Pivot
Sorted
Guide
Sorting Algorithm Visualizer animates how arrays change across different sorting methods. It supports step playback, speed control, and operation counters for study, teaching, interviews, and implementation comparison.
Key Features
- Visualizes Quick, Merge, Bubble, Selection, and Insertion sort in one workspace.
- Supports random, nearly sorted, reversed, and few-unique input patterns.
- Provides start, pause, step, reset, and speed controls for detailed inspection.
- Tracks comparisons, swaps, writes, and total progress in real time.
How To Use
- Choose an algorithm and data pattern, then set array size and animation speed.
- Click Generate New Array to prepare input data for the current setup.
- Use Start for continuous playback, or Step for action-by-action inspection.
- Read counters and color states, then switch algorithms to compare behavior.
What To Observe
- For Quick Sort, focus on pivot movement and recursive partition ranges.
- For Merge Sort, watch dense write operations during merge phases.
- For Bubble and Selection, compare how O(n^2) operation growth appears visually.
- For Insertion Sort, test nearly sorted data to see its practical advantage.
FAQ
Do counters equal real runtime: they are for process comparison, not wall-clock timing.
Why test different patterns: to compare the same algorithm under different inputs.
Is data uploaded: no, generation and sorting run locally in your browser.
Privacy
This tool does not upload your data. Sorting logic, animation, and metrics are processed locally in the browser.