VISUALGO
//
Problems
Playground
Learn
/
Playground
Sorting
Bubble Sort
VISUALGO
//
SORT
bubble sort · sorting trace console · O(n²)
●
COMPARING
●
SWAPPED
●
SORTED
Goal:
Rearrange all elements in
ascending order
using bubble sort.
1
6
7
4
2
3
8
5
SPEED — 20
RUN
ELEMENTS
SET
NEW SHUFFLE
READOUT
step
0 / 38
pass
1
comparisons
22
swaps
11
status
IDLE