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:

    Each swung in danger on its slender twig,
    A bubble on a pipestem, growing big.
    Robert Frost (1874–1963)

    Rice and peas fit into that category of dishes where two ordinary foods, combined together, ignite a pleasure far beyond the capacity of either of its parts alone. Like rhubarb and strawberries, apple pie and cheese, roast pork and sage, the two tastes and textures meld together into the sort of subtle transcendental oneness that we once fantasized would be our experience when we finally found the ideal mate.
    John Thorne, U.S. cookbook writer. Simple Cooking, “Rice and Peas: A Preface with Recipes,” Viking Penguin (1987)