[net.sources] Bubble sorts, etc. reposting

ojs@fortune.UUCP (Oliver Sharp) (06/20/84)

[Die, die, die, die, .... ahem.]


  Well, this discussion really doesn't belong in net.sources, but
  ......

    If you want THE definitive discussion of sorts, you must of course
    go to Knuth.  A bubble sort is the fastest means possible to sort
    an already-sorted list (order n, even omega n!).  It is not so hot
    for unsorted lists, however, a more somewhat more common
    occurence :-).  It works fine for a few elements (1 microsecond, 2
    microseconds - who cares?) and is quick and easy to implement.  A
    selection or insertion sort is often faster, but the bubble sort
    is perfectly valid for teaching.  I like to use mergesorts when I
    need fairly fast speed, since this is simple to implement and runs
    in order n*log(n).  It isn't quite as good as quicksort or its
    derivatives, but it isn't bad.  I just like the clean and simple
    implementation it allows and it is easy to explain to people in a
    couple of minutes.

	In general, though, I agree with the person who supported the
	person posting the article (sorry about all those person's).
	If you aren't interested in the article, don't read it.  Any
	submission of interest to at least a couple of people should
	be encouraged - that is what the net is for, after all!

	(still working on a sign-off message)

Oliver Sharp
	   ....!fortune!ojs