Re: problem in solving this.

<nmm1@xxxxxxxxx> wrote in message news:gqe0ii$4dq$1@xxxxxxxxxxxxxxxxxxxxxxxxxxx
In article <gqe045$a6d$1@xxxxxxxxxxxxxxxx>,
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:

Sort naming is an inexact science. Bubblesort seems to be
in the category of "exchange selection" sort in Knuth's book.
Knuth's algorithm B does move the largest to the end on
the first pass. Then his refinement to bubblesort, the
"cocktail shaker sort," (quotes in original) uses alternate
direction passes. I would say that the vectorized version
would be a new member of the "exchange selection" class,
but you should probably ask Knuth.

I am a "clumper", not a "splitter" in this respect - and, in any
case, the term "bubble sort" predates his classification. All of
the sorts that compare a value only with its next neighbour or do
something functionally equivalent (e.g. search successive neighbours
in one direction for the point to exchange to) can reasonably be
regarded as belonging to the same class.

That is a glib statement , for it would lump in
many sort algorithms including Quicksort.


Relevant Pages

  • Re: Help me with references
    ... I can't think of any situation in which bubble sort is ... > best choice for a sorting algorithm in a real machine. ... Quicksort is optimized for large Ns. ... I picked Bubblesort because your original post implied something along ...
  • Re: Help me with references
    ... > want to sort something there really isn't ever a good use for bubble sort. ... > reason to use a specific algorithm. ... BubbleSort has a small constant. ... Mergesort of Quicksort if the size of the set is greater than 10 elements, ...
  • Re: Sorting
    ... Then go back to the start of the array and do it again, until you make a clean sweep without swapping. ... This algorithm is called bubblesort. ... less efficient than selection sort or insertion sort, ...
  • Re: Sort Two Dimensioanl Array
    ... Does Chris' Bubble Sort work - works in 2003 Autotext. ... Sort the given array into order. ... Optional SortAscending As Boolean = True) ... Dim BubbleSort As Long ...
  • Excel VBA - Sort a table with BubbleSort
    ... I need to sort a table with BubbleSort. ... I know how the algorithm works: ... Do I need an array? ...