Bubble sorts have their place (was: FLUKE?

From: Carlos Murillo <cmurillo_at_emtelsa.multi.net.co>
Date: Mon Dec 3 20:56:05 2001

At 12:58 AM 12/4/01 +0000, you wrote:
>OK, I'll admit it. I've used a bubble sort -- I had a list of 5 items to
>sort, no sort routine in the standard library, and run time was not that
>important. A bubble sort seemed to make sense there.
>So the original statement was a little strong, sure. But equally, I've
>seen the bubble sort be used in far too many places where it was the
>wrong choice...
>
>-tony

I've used it just a few days ago, while ordering the row indexes
of elements in each column of the incidence matrix of _very large_
networks. However, these networks are very sparsely connected,
with usually just two connections per node, and the average number of
connections per node is 2.3-2.6 . This means that in most cases a bubble
sort will swap data at most once for each column. Definitely the
best algorithm for the problem at hand.

carlos.

--------------------------------------------------------------
Carlos E. Murillo-Sanchez carlos_murillo_at_nospammers.ieee.org
Received on Mon Dec 03 2001 - 20:56:05 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:37 BST