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:

    Then a soldier,
    Full of strange oaths, and bearded like the pard,
    Jealous in honor, sudden, and quick in quarrel,
    Seeking the bubble reputation
    Even in the cannon’s mouth.
    William Shakespeare (1564–1616)

    Ah, I fancy it is just the same with most of what you call your “emancipation.” You have read yourself into a number of new ideas and opinions. You have got a sort of smattering of recent discoveries in various fields—discoveries that seem to overthrow certain principles which have hitherto been held impregnable and unassailable. But all this has only been a matter of intellect, Miss West—superficial acquisition. It has not passed into your blood.
    Henrik Ibsen (1828–1906)