Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site callan.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!floyd!whuxle!mit-eddie!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!trwrb!scgvaxd!wlbr!callan!geoff
From: geoff@callan.UUCP
Newsgroups: net.sources,net.followup,net.flame
Subject: Re: A Simple Bubble Sort Function
Message-ID: <165@callan.UUCP>
Date: Sat, 9-Jun-84 14:13:53 EDT
Article-I.D.: callan.165
Posted: Sat Jun  9 14:13:53 1984
Date-Received: Mon, 11-Jun-84 23:47:22 EDT
References: <965@ihuxq.UUCP>
Organization: Callan Data Systems, Westlake Village, CA
Lines: 12
Xref: 241 725 1186

Jack Purdum is rapidly getting a reputation as an idiot with me.  I thought
that by now *EVERYBODY* knew that the bubble sort is for cretins.  If you
want a quick simple sort, write a "selection sort":  search 0 thru n for the
largest item and swap it with the item in slot n;  repeat with n=n-1 until
done.  This is exactly the effect that the bubble sort achieves (think about
it for a while if you aren't sure), but without all the unnecessary exchanges.

Moral:	Don't waste your effort optimizing the wrong solution to the problem.

	Geoff Kuenning
	Callan Data Systems
	...!ihnp4!wlbr!callan!geoff