← 🤖 Algorithms

📊 Sorting

Algorithm
Comparisons0
Swaps 0
Array accesses0
Time
Status Ready
Unsorted
Comparing
Swapping
Pivot / key
Sorted
Select algorithm · Resize array · Click Sort · Toggle sound

📊 Sorting Algorithms — Visual & Audio

12 sorting algorithms animated as bar charts with Web Audio tones. Compare speed, comparisons and swap counts across Bubble Sort, Quick Sort, Merge Sort, Heap Sort and many more.

🔬 What It Demonstrates

Each algorithm rearranges bars in real time. Comparisons are highlighted, swaps are animated, and audio pitch maps bar height — you can literally hear the sorting process.

🎮 How to Use

Select an algorithm and array size. Click Sort and watch (and listen). Compare different algorithms on the same data to see the speed difference.

💡 Did You Know?

Quick Sort averages O(n log n) but can degrade to O(n²). Merge Sort is always O(n log n) but needs extra memory. No comparison-based sort can beat O(n log n) on average — this was proven in 1972.