Why aren't we all speaking LISP now?

Alex Martelli aleaxit at yahoo.com
Fri May 11 18:40:31 EDT 2001


"Roy Smith" <roy at panix.com> wrote in message
news:9dgovd$gh0$1 at panix6.panix.com...
> Alex Martelli <aleaxit at yahoo.com> wrote:
> > Might you please explain what makes you choose it over _selection_ sort?
>
> I hadn't given it that much thought, to be honest.
>
> > I've heard it claimed that 'bubble' is a more natural
> > way to sort.
>
> It just occurred to me that one possible reason a bubble sort might be
> interesting is because you only do nearest-neighbor exchanges.  I
> could imagine some system made up of a large array of nano-processor
> cells, where each cell holds a single entry, and can only talk to its
> immediate neighbors.  Bubble sort might be the best way to implement a
> sort in a situation like that :-)

Yes, if swaps cost in proportion to the distance of the items being
swapped, then choosing an optimal sort becomes quite different.


> I agree with your bridge hand sorting story -- that's the way I sort a
> bridge hand.

A-ha, a fellow bridgeplayer...!-)


Alex






More information about the Python-list mailing list