Salmanasmat
Sorting Algorithms Visualizer
🌙
Bubble Sort
Selection Sort
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
▶ Start Sorting
🎲 Randomize
⏹ Stop
Pace
Random
Reversed
Nearly Sorted
Duplicates
Small Set
Large Set
Comparisons
0
Swaps
0
Time
0
ms
⚡ Speed Ranking
1st
Merge Sort
O(n log n)
2nd
Quick Sort
O(n log n)
3rd
Heap Sort
O(n log n)
4th
Insertion Sort
O(n²)
💾 Memory Ranking
1st
Bubble Sort
O(1)
1st
Selection Sort
O(1)
3rd
Quick Sort
O(log n)
4th
Merge Sort
O(n)
🎯 Best Use Cases
Nearly Sorted
Insertion Sort
Large Datasets
Merge Sort
Memory Limited
Heap Sort
General Purpose
Quick Sort
📊 Detailed Complexity Comparison
Algorithm
Best
Average
Worst
Space
Stable
Merge Sort
O(n log n)
O(n log n)
O(n log n)
O(n)
Yes
Quick Sort
O(n log n)
O(n log n)
O(n²)
O(log n)
No
Heap Sort
O(n log n)
O(n log n)
O(n log n)
O(1)
No
Insertion
O(n)
O(n²)
O(n²)
O(1)
Yes