Sorting Algorithm Showdown
Compare sorting algorithms in real-time with synchronized step speed
🏆 Completion Ranking
22550
1 (slow)30 (normal)60 (fast)
⚡ All algorithms execute at 30 steps per second (~33ms per step)
Bubble Sort
Steps:
0
Selection Sort
Steps:
0
Insertion Sort
Steps:
0
Quick Sort
Steps:
0
Complexity Analysis
Bubble Sort
Best: O(n) | Avg: O(n²) | Worst: O(n²)
Space: O(1)
Selection Sort
Best: O(n²) | Avg: O(n²) | Worst: O(n²)
Space: O(1)
Insertion Sort
Best: O(n) | Avg: O(n²) | Worst: O(n²)
Space: O(1)
Quick Sort
Best: O(n log n) | Avg: O(n log n) | Worst: O(n²)
Space: O(log n)
Merge Sort
Best: O(n log n) | Avg: O(n log n) | Worst: O(n log n)
Space: O(n)
📊 About this visualization:
- All algorithms execute at exactly the same steps per second for fair comparison
- Each 'step' represents one comparison or swap operation
- The algorithm that finishes first with fewer steps is more efficient
- Yellow bars show elements being compared, colored bars show sorted elements
- Time measurement includes actual execution + visualization overhead