User Tools

Site Tools

This is an old revision of the document!

Bubble sort

Bubble sort is a simple sorting algorithm that sorts by repeatedly swapping out of order pairs until there are no more pairs that need swapping. It is very seldom a good choice for production use; it is almost always better to use an insertion sort for small data or a more complicated sort. A related sort is the Cocktail sort, which can be considered an optimized bubble sort. Cocktail sort is also seldom suitable for production use.

λ bubble_sort

bubble_sort.1368954386.txt.gz · Last modified: 2015/02/02 08:24 (external edit)