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:
“No bubble is so iridescent or floats longer than that blown by the successful teacher.”
—Sir William Osler (18491919)
“They are very proper forest houses, the stems of the trees collected together and piled up around a man to keep out wind and rain,made of living green logs, hanging with moss and lichen, and with the curls and fringes of the yellow birch bark, and dripping with resin, fresh and moist, and redolent of swampy odors, with that sort of vigor and perennialness even about them that toadstools suggest.”
—Henry David Thoreau (18171862)