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.


.