bubble sort

(redirected from Bubblesort)

bubble sort

[′bəb·əl ‚sȯrt]
(computer science)
A procedure for sorting a set of items that begins by sequencing the first and second items, then the second and third, and so on, until the end of the set is reached, and then repeats this process until all items are correctly sequenced.

bubble sort

A sorting technique in which pairs of adjacent values in the list to be sorted are compared and interchanged if they are out of order; thus, list entries "bubble upward" in the list until they bump into one with a lower sort value. Because it is not very good relative to other methods and is the one typically stumbled on by naive and untutored programmers, hackers consider it the canonical example of a naive algorithm. The canonical example of a really *bad* algorithm is bogo-sort. A bubble sort might be used out of ignorance, but any use of bogo-sort could issue only from brain damage or willful perversity.

bubble sort

A sorting technique that is typically used for sequencing small lists. It starts by comparing the first item to the second, the second to the third and so on until it finds one item out of order. It then swaps the two items and starts over. The sort may alternate from the top of the list to the bottom and then from the bottom to the top. The name comes from the notion that items are raised or "bubbled up" to the top. See sort algorithm.
References in periodicals archive ?
It consists in evaluating the run-times of three well-known sorting algorithms: QuickSort, BubbleSort and InsertSort.
The empirical results show that the fastest sorting algorithm is Quicksort, followed by Insertsort, then by Bubblesort.
Keywords: sorting algorithm, complexity, QuickSort, BubbleSort, InsertSort
Like Quicksort, Bubblesort is widely used, but not necessarily because of its efficiency, having O(n2) theoretical time-complexity, but because of its simplicity.
For this research were chosen the most used three programming languages (Java, C ++ and C #) in which were implemented the following sorting algorithms: QucikSort, BubbleSort and direct insertion sort, in order to find out which programming language provides the shortest run-time.
Of the three sorting algorithms the most efficient one was QuickSort, followed by Direct insertion sort who earned an average run-time / array up to nine times higher in C #, eight times higher in C ++ and about three times higher in java, in comparison with QuickSort; on the last place is BubbleSort who earned an average run-time / array up to three times higher in C ++ and C # and 6 times higher in Java in comparison with Direct insertion sort.
Of the three programming languages, Java was the most efficient, obtaining for the BubbleSort algorithm an average run-time / array with up to two times lower in comparison with C ++ and up to four times lower in comparison with C#, for the Direct Insertion Sort algorithm an average run-time / array with up to four times lower in comparison with C ++ and up to eight times lower in comparison with C#, for the Quicksort algorithm an average run-time / array with approximately 1.
Commutation properties among bubblesort, stacksort and their duals.
Contrast this with bubblesort (which simply passes over a list as many times as necessary, swapping any two consecutive elements in the wrong order, until the entire list is sorted).
2] exchange methods, Bubblesort and Shakersort, and one n log n method, Quicksort [ILLUSTRATION FOR FIGURE 3 OMITTED].
This final fade out happens long before they are finished, since it would take another 54 minutes for Bubblesort to complete.
Multiple transforms may apply to a program; in the case of sort, it may be implemented by refining it into a bubblesort or a mergersort (Figure 3).