bubble sort algorithm

Quick Reference

Makes repeated passes through a list of numbers, and on each pass, adjacent numbers are compared and reversed if they are not in the required order. Each pass will put at least one more element into the correct position, like bubbles rising, and the process is complete when a complete set of comparisons is made which required no switching.

http://www.ndsu.nodak.edu/instruct/juell/vp/cs1and2/sortdemo/BubbleSortDemo.html A demonstration of the bubble sort in action.

Subjects: Mathematics.

Reference entries