bubble sort


Also found in: Dictionary, Thesaurus, Medical, Legal, Wikipedia.

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 ?
Like Quicksort and Bubble Sort, Direct insertion sort is a comparison sort algorithm.
It is clear from Table 3 that tested program has minimum differences from bubble sort provided that m variable be assigned to i variable and n be assigned to j.
Number of Program Loc Description targets Insertion sort 16 Array sorting 4 Bubble sort 18 Array sorting 4 Triangle 20 Return the type of a triangle 4 Binary search 37 Key number searching 7 Gcd 55 Compute greatest common divisor 20 Look 135 Find words in the system dictionary 30 or lines Comm 145 Select or reject lines common 30 Cal 160 Print a calendar for a specified 30 year or month Controller 172 Internal states regulation 30 Tcas 173 Altitude separation 30 Col 275 Filter reverse paper motions 50 Spline 289 Interpolate smooth curve 50 Tot_info 365 Statistics computation 50 Schedule2 374 Priority scheduler 50 Printtok 400 Lexical analyzer 50 Schedule 412 Priority scheduler 50 Replace 564 Pattern replace 100 Barcode 672 Barcode maker 100 Table 4: Parameter settings.
There are four sorting algorithms in the system: bubble sort, insertion sort, selection sort, and quick sort.
Block orderings are carried out by the Bubble method or Bubble Sort with sentinel.