Sorting Algorithm Visualiser

Algorithm
Array Size
30
Speed (ms)
100
Unsorted
Comparing
Swapping
Pivot
Sorted

Race Mode

Compare Bubble Sort, Insertion Sort, and Merge Sort

Bubble Sort
Insertion Sort
Merge Sort

Bubble Sort Track

Comparisons
0
Swaps
0

Insertion Sort Track

Comparisons
0
Swaps
0

Merge Sort Track

Comparisons
0
Swaps
0
0
Comparisons
0
Swaps
0s
Time Elapsed
0
Current Step

Bubble Sort

Bubble Sort repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.

Best Case
O(n)
Average Case
O(n²)
Worst Case
O(n²)
Space
O(1)