Bubble sort
do { for each element a[i] (0 <= i < n-1) if (a[i]>a[i+1]) the swap(a,i,i+1)} while at least one pair is exchanged;
Previous slide
Next slide
Back to first slide
View graphic version