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:

    While this America settles in the mould of its vulgarity, heavily
    thickening to empire,
    And protest, only a bubble in the molten mass, pops and sighs out,
    and the mass hardens,
    Robinson Jeffers (1887–1962)

    Both the Moral Majority, who are recycling medieval language to explain AIDS, and those ultra-leftists who attribute AIDS to some sort of conspiracy, have a clearly political analysis of the epidemic. But even if one attributes its cause to a microorganism rather than the wrath of God, or the workings of the CIA, it is clear that the way in which AIDS has been perceived, conceptualized, imagined, researched and financed makes this the most political of diseases.
    Dennis Altman (b. 1943)