Algorithm Visualizer
Explore, visualize and understand algorithms
Standard Mode
Advanced Mode
Algorithm Categories
Data Input
5x
Visualization
Bubble Sort
Description
Bubble Sort repeatedly traverses the array, comparing adjacent elements and swapping them if they are in incorrect order. The largest element "bubbles" to the end in each pass, gradually sorting the array.
Time Complexity
Best Case: O(n) (when array is already sorted) | Average Case: O(n²) | Worst Case: O(n²)
Space Complexity
O(1) - requires only a constant amount of additional memory space
Execution Monitoring
Press "Start" to begin visualization
Statistics
Operations: 0
Comparisons: 0
Swaps: 0
Time: 0.00s