Algorithm Comparison
Compare two algorithms side-by-side to understand their differences
Select Algorithms to Compare
Bubble Sort
A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Time: O(n²)
Space: O(1)
Visualization
Step 1 of 16
Start of Pass 1. Compare the first two elements: 5 and 3.
Quick Sort
An efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order using a pivot.
Time: O(n log n)
Space: O(log n)
Visualization
Step 1 of 13
Initial array. Let's partition the whole array. Pivot is 70 (last element).
Step 1 / 16
Speed:
Performance Metrics
Bubble Sort
- Total Steps: 16
- Current Step: 1
- Progress: 0%
Quick Sort
- Total Steps: 13
- Current Step: 1
- Progress: 0%
O(n²):Quadratic time - grows with square of input size
O(n²):Quadratic time - grows with square of input size
Tip: The chart shows how the number of operations grows as input size increases. Lower curves indicate better performance for large inputs.