Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Bubble sort


Related Topics

In the News (Wed 30 May 12)

  
  Bubble sort - Wikipedia, the free encyclopedia
However, some researchers such as Owen Astrachan have gone to great lengths to disparage bubble sort and its continued popularity in computer science education, recommending that it no longer even be taught.
Bubble sort is asymptotically equivalent in running time to insertion sort in the worst case, but the two algorithms differ greatly in the number of swaps necessary.
Experiments by Astrachan sorting strings in Java show bubble sort to be roughly 5 times slower than insertion sort and 40% slower than selection sort.
en.wikipedia.org /wiki/Bubble_sort   (717 words)

  
 Bubble Sort   (Site not responding. Last check: 2007-11-06)
The bubble sort is the oldest and simplest sort in use.
The bubble sort is generally considered to be the most inefficient sorting algorithm in common usage.
A sample C program that demonstrates the use of the bubble sort may be downloaded here.
linux.wku.edu /~lamonml/algor/sort/bubble.html   (280 words)

  
 Report on Bubble Sort Algorithm   (Site not responding. Last check: 2007-11-06)
The sorting algorithm that I have researched is the bubble sort algorithm.
Selection sort minimizes the amount of time by just scanning the unsorted portion of the list, and finding the largest number at each turn, while bubble sort adds to the amount of time by comparing every adjacent numbers.
Radix Sort has a Big O of (nk) where n is the number of elements and k is the average length of the keys.
www2.hawaii.edu /~roasay/BubbleSort.htm   (925 words)

  
 GameDev.net - Bubble Sort   (Site not responding. Last check: 2007-11-06)
{ Bubble Sort Bubble Sort is an elementary sorting algorithm.
Bubble Sort works by repeatedly scanning the array, checking adjacent pairs of values to see if they are in the proper order.
The amount of work (comparisons/exchanges) done by Bubble Sort in average case is difficult to analyze, but it is quite close to the work needed in the worst case.
www.gamedev.net /reference/articles/article298.asp   (374 words)

  
 Bubble Sort   (Site not responding. Last check: 2007-11-06)
Like all comparison based sorting techniques Bubble Sort is based on comparing two keys and rearranging the associated data in order to place the keys in ascending or descending order.
Bubble Sort was one of the first sorting methods created.
Bubble Sort was so named because as you repeatedly scan the array of records making comparisons the lower value keys gradually "bubble" to the start of the array.
www.cs.uah.edu /~rcoleman/Sorting/BubbleSort.html   (213 words)

  
 AI Horizon: Bubble Sort
Bubble Sort is by far the simplest and shortest of all the sorting algorithms.
One of the problems with Bubble Sort is that even when the array is fully sorted, the sort continues.
The only efficiency improvement to Bubble Sort is the early exit flag, since that does not add much length to the code.
www.aihorizon.com /essays/basiccs/lists/sorting/bubble.htm   (713 words)

  
 Cprogramming.com - Algorithms - Bubble Sort and Modified Bubble Sort
Any of these sorting algorithms are good enough for most small tasks, though if you were going to process a large amount of data, you would want to choose one of the sorting algorithms listed on the advanced sorting page.
The bubble sort works by iterating down an array to be sorted from the first element to the last, comparing each pair of elements and switching their positions if necessary.
A better version of bubble sort, known as modified bubble sort, includes a flag that is set if an exchange is made after an entire pass over the array.
www.cprogramming.com /tutorial/computersciencetheory/sorting1.html   (438 words)

  
 SparkNotes: Bubble Sort: The Bubble Sort Algorithm
As explained above, bubble sort is structured so that on each pass through the list the next largest element of the data is moved to its proper place.
Bubble sort is also efficient when one random element needs to be sorted into a sorted list, provided that new element is placed at the beginning and not at the end.
The absolute worst case for bubble sort is when the smallest element of the list is at the large end.
www.sparknotes.com /cs/sorting/bubble/section1.html   (524 words)

  
 10.2.2 Bubble Sort   (Site not responding. Last check: 2007-11-06)
Like selection sort, the idea of bubble sort is to repeatedly move the largest element to the highest index position of the array.
One complete bubble step moves the largest element to the last position, which is the correct position for that element in the final sorted array.
There is a great deal of swapping required in bubble sort to ``bubble'' the largest element to the highest index; where in selection sort, it is done by a single swap.
www-ee.eng.hawaii.edu /Courses/EE150/Book/chap10/subsection2.1.2.2.html   (959 words)

  
 INTRO   (Site not responding. Last check: 2007-11-06)
The elements "bubble" down to their correct index, hence the title bubble sort (other common names for this algorithm are sinking sort and exchange sort).
Most other sorting algorithms have a history of being tested on a machine with low memory, or where a desperate scientist is laboring in a labroom and is struck with an epiphiny.
As indicated from its name, it is a sort that "bubbles" large values to the end and small values to the front.
www2.hawaii.edu /~marocco/bubblesort.htm   (1116 words)

  
 [No title]
The second version to write the bubble sort in Pascal will stop the loop when the array is sorted.
The bubble sort can also be used to sort an array of records.
Bubble sorting is one of the most efficient ways to sort a short array of data and to sort an array of data that you know is mostly sorted.
www.wiu.edu /users/mflll/cs214/bubble_sort.html   (753 words)

  
 Three Dimensional Bubble Sort
This sorting algorithm can be taken to even higher dimensions, and can be applied to any combination of properties, not just the colours of pixels.
It illustrates a sort based on a special palette of 15 hues of each of the colours: Red, Green, Blue, Magenta, Cyan, and Yellow, for a total of 90 colours.
Below is a graph that illustrates progress during the sort for various numbers of colours on a square 512 pixels on a side.
www.magma.ca /~gtaylor/3dBubbleSort.htm   (954 words)

  
 jargon, node: bubble sort   (Site not responding. Last check: 2007-11-06)
bubble sort /n./ Techspeak for a particular 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.
A bubble sort might be used out of ignorance, but any use of bogo-sort could issue only from brain damage or willful perversity.
www.jargon.net /jargonfile/b/bubblesort.html   (114 words)

  
 Bubble Sort Functional Specification
This algorithm is called the bubble sort because names rise to the top one at a time, much like air bubbling up through water.
At this point, the sort could simply terminate, rather than going through the list again and again, and not making any changes, until it has made a number of passes equal to the number of records in the list.
The bubble sort was popular on mainframe computers that were programmed during the day and were left running all night to process their data.
www.wepin.com /uop/pos431/ws2/bsortspec.html   (888 words)

  
 Bubble Sort Presentation   (Site not responding. Last check: 2007-11-06)
 A bubble sort may "quit early" if it makes a pass in which no exchanges are made.
This sort also uses pseudo-random numbers to generate the numbers to sort.
The final sort, stringBubbleSort.cpp, initializes an array of strings in the code (it uses names)  and calls a bubble sort algorithm which is set up to sort an array of strings.
www.rsu.edu /faculty/johnnycarroll/cs2323v/sp00/bubbleSortPresentation.htm   (479 words)

  
 Bubble sort   (Site not responding. Last check: 2007-11-06)
Bubble sort is like selection sort, in that each iteration places the largest unsorted element into its correct place in the array.
It differs from selection sort, however, in that each iteration also makes changes in the locations of the other elements in the array.
Note that in the process of placing the 45 in its correct location, the 6 and 12 have moved closer to their correct locations, and the 36 has moved closer to its correct location.
www.cs.wpi.edu /~cs2005/common/bubble.html   (252 words)

  
 Bubble Sort Tutorial   (Site not responding. Last check: 2007-11-06)
The bubble sort does have its advantages though, mainly because it is simple to understand and implement.
The best place to use a bubble sort in your programs would be in an application that doesn't need speed and has a relatively small amount of data to be sorted (5 items?).
I'm sure a bubble sort would be a piece of cake to write in QB if you just keep an eye on the pseudo-code at the beginning of this tutorial.
download.cdsoft.co.uk /tutorials/bubblesort   (819 words)

  
 Insertion Sort   (Site not responding. Last check: 2007-11-06)
To save memory, most implementations use an in-place sort that works by moving the current item past the already sorted items and repeatedly swapping it with the preceding item until it is in place.
Although it has the same complexity, the insertion sort is a little over twice as efficient as the bubble sort.
At the same time, the insertion sort is over twice as fast as the bubble sort and almost 40% faster than the selection sort.
linux.wku.edu /~lamonml/algor/sort/insertion.html   (253 words)

  
 What is bubble sort? - A Word Definition From the Webopedia Computer Dictionary   (Site not responding. Last check: 2007-11-06)
Bubble sorting is used frequently as a programming exercise because it is relatively easy to understand.
Other sorting algorithms, such as heap sorts, merge sorts and quicksorts, are used more often in real applications.
This is a technical explanation of the bubble sort algorithm from a manual entitled, "Ada: A Developmental Approach".
www.webopedia.com /TERM/B/bubble_sort.html   (77 words)

  
 bubble sort   (Site not responding. Last check: 2007-11-06)
Definition: Sort by comparing each adjacent pair of items in a list in turn, swapping the items if necessary, and repeating the pass through the list until no swaps are done.
Bidirectional bubble sort usually does better since at least one item is moved forward or backward to its place in the list with each pass.
Paul E. Black, "bubble sort", from Dictionary of Algorithms and Data Structures, Paul E. Black, ed., NIST.
www.nist.gov /dads/HTML/bubblesort.html   (217 words)

  
 Bubble Sort   (Site not responding. Last check: 2007-11-06)
Notice that with the bubble sort, the highest number is sinking to the bottom.
Note also that the bubble sort because it does not compare to an anchored number, but varies both numbers tends to get things in order as it works.
The sort is complete because there has been a pass with no flips or because there have been the right number of passes (with 5 elements, the right number of passes would be 4).
www.bristol.mass.edu /pgrocer/cis52/presentations/bubblesort.html   (606 words)

  
 xSortLab Lab
Sorting consists of these two operations performed over and over (plus some "bookkeeping," such as keeping track of which step in the sort the computer is currently performing).
Bubble Sort, Selection Sort and Insertion Sort are fairly straightforward, but they are relatively inefficient except for small lists.
Bubble Sort is often the first -- and sometimes the only -- sorting method that students learn.
math.hws.edu /TMCM/java/labs/xSortLabLab.html   (4241 words)

  
 [No title]   (Site not responding. Last check: 2007-11-06)
In order to make a comparison of the behaviour of the insertion sort algorithm a second algorithm, known as the bubble sort, will be introduced.
Assuming that an instantiated version of this procedure is available to a test harness client, the operation of the algorithm can be illustrated by considering the sorting of the same list of integers as was used in Section 4 Chapter 5 to illustrate the operation of the insertion sort.
The reason why this is called a bubble sort can be deduced by considering the way in which the value 34, which was initially at the end of the list, moved one location towards its eventual location on every iteration of the outermost loop.
www.scism.sbu.ac.uk /law/Section5/chap2/s5c2p13.html   (769 words)

  
 Bubble Sort Demonstration   (Site not responding. Last check: 2007-11-06)
The array of values to be sorted is divided into two partitions: the partition of sorted values and that of unsorted values.
In each step of bubble sort, the smallest element found so far in the unsorted partition moves up, and it is appended to the end of the sorted partition.
The sorting proceeds until the elements in the unsorted partition are exhausted.
web.engr.oregonstate.edu /~minoura/cs261/javaProgs/sort/BubbleSort.html   (138 words)

  
 Bubble Sort algorithms - Origin C programming example
This example demonstrates how a bubble sort algorithm can be incorporated into an Origin C function and used to sort data in a worksheet column.
Sort All - Makes 50 passes through the sort algorithm, thereby sorting all 50 bars in the bar plot.
In bsdSort, a do-while loop is used to perpetuate the sort as long as two conditions are true: 1) the flag called iAllSorted must return a non-zero value and 2) the number of passes (iNumPass) must be greater than the current pass index (iPass).
www.originlab.com /index.aspx?s=8&lm=117&pid=250   (497 words)

  
 Bubble Sort Algorithm
Below is the basic algorithm for a bubble sort that sorts in descending order.
One difference between a bubble sort and a selection sort is that a bubble sort switches elements as it goes through the array.
One way to remember the difference between the two sorts is that a bubble sort switches elements as it goes through the list, but a selection sort only swaps once each time through the list.
amath.colorado.edu /courses/2710/2004Sum/module10/bubalg.html   (264 words)

  
 Cocktail sort - Wikipedia, the free encyclopedia
It can achieve slightly better performance than a standard bubble sort.
Note that 'shaker sort' can also refer to a variant of selection sort.
The complexity of cocktail sort in Big O notation is O(n²) for a worst case, but becomes closer to O(n) if the list is mostly ordered at the beginning.
en.wikipedia.org /wiki/Cocktail_sort   (100 words)

  
 The Old Joel on Software Forum - Bubble sort reversed
Bubble sort is known to have a predictable N square iterations before the array is fully sorted.
The code from http://linux.wku.edu/~lamonml/algor/sort/bubble.html looks like this, as it would from anywhere else, as long as Bubble sort was the topic.
For Python's sort function, comparisons are expensive (in the worst case each comparison may have to call a function written in Python) and a sophisticated mergesort is clearly the way to go.
discuss.fogcreek.com /joelonsoftware?cmd=show&ixPost=119736   (1828 words)

  
 CS 227 Project   (Site not responding. Last check: 2007-11-06)
In Bubble Sort, you just keep making passes through the array, swapping adjacent elements if the first one is greater than the second one.
Regardless, there does not appear to be a significant difference in performance between sorting integers and reals for medium to small N (I didn't really have time, or memory, to run them on an N larger than 1024).
Bubble sort gets there by doing N comparisons each time it goes through the array, which it does N times.
www.mathcs.carleton.edu /courses/course_resources/cs227_w96/gottliej   (1633 words)

  
 One Dimensional Bubble Sort - ISU Complex Computation Lab
This example implements a one-dimensional bubble sort algorithm using the Trend simulation environment.
In this bubble sort, no centralized control is used in sorting the elements of the array.
In stead, each element sorts itself by comparing its value with the values of its neighbors.
www.complex.iastate.edu /download/Trend/examples/bubble.html   (106 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.