Sorting Algorithm Visualizer

Selected: Bubble Sort (O(n²))
530
Array Type:Random
Size:10
Steps:0
89
68
93
25
7
40
37
37
35
91
Comparisons:0
Swaps:0
Time:0s
Array Size:10
Min Value:7
Max Value:93

Algorithm Pseudocode

Bubble Sort
1for i = 0 to n-1:
2 for j = 0 to n-i-2:
3 if arr[j] > arr[j+1]:
4 swap(arr[j], arr[j+1])

Legend:

Compare
Swap
Sorted
Pivot
Merge