Bubble Sort

Bubble sort, sometimes incorrectly referred to as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm gets its name from the way smaller elements "bubble" to the top of the list. Because it only uses comparisons to operate on elements, it is a comparison sort. Although the algorithm is simple, most of the other sorting algorithms are more efficient for large lists.

Read more about Bubble Sort:  In Practice, Variations, Misnomer

Famous quotes containing the words bubble and/or sort:

    If the bubble reputation can be obtained only at the cannon’s mouth, I am willing to go there for it, provided the cannon is empty.
    Mark Twain [Samuel Langhorne Clemens] (1835–1910)

    I don’t believe any more in democracy. But I can’t believe in the old sort of aristocracy, either, nor can I wish it back, splendid as it was. What I believe in is the old Homeric aristocracy, when the grandeur was inside a man, and he lived in a simple wooden house.
    —D.H. (David Herbert)