Why aren't we all speaking LISP now?
Roy Smith
roy at panix.com
Fri May 11 09:20:45 EDT 2001
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 :-)
I agree with your bridge hand sorting story -- that's the way I sort a
bridge hand.
More information about the Python-list
mailing list