in reply to Making bubble sort look good

The jargon file has a nice entry on this, bogo-sort. I suppose their code would look like:

use Quantum::Superpositions qw(any); return any(splatterSort(@list) and isSorted(@list));
Then again, I've never used the Quantum functions-- and yes, I know you can't 'destroy the Universe' just by using DConway's modules... yet.

Replies are listed 'Best First'.
Re: Re: Making bubble sort look good
by RMGir (Prior) on Aug 04, 2003 at 20:55 UTC
    Aha! I knew I'd seen something like that somewhere before.

    That's probably where I picked it up, since I read the jargon list from end to end a while back. (It's hard to beat "The Story of Mel")

    I wasn't kidding about the traumatically bad assignments those students handed in, though...
    --
    Mike