Bubble sort
Walk along the row comparing each neighbouring pair, and swap any pair standing the wrong way round. Each walk carries the biggest number left to the end, until a walk swaps nothing.
- comparisons
- 0
- swaps
- 0
step 1 of 1
Examples
Walk along the row comparing each neighbouring pair, and swap any pair standing the wrong way round. Each walk carries the biggest number left to the end, until a walk swaps nothing.
step 1 of 1
Examples