Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Array Shuffle

by northwind (Hermit)
on Feb 28, 2006 at 13:13 UTC ( [id://533337]=note: print w/replies, xml ) Need Help??


in reply to Re: Array Shuffle
in thread Array Shuffle

Said brute-force solution would fall in the category of bogoshuffle...   :P

Replies are listed 'Best First'.
Re^3: Array Shuffle
by QM (Parson) on Feb 28, 2006 at 18:21 UTC
    Reading the whole WP entry, you might try a bozo-shuffle -- if it's not shuffled, swap the current item for an item later in the list, then back up 1 position (as the just swapped in item might sort before the previous item).

    (This seems to devolve into a bubblesort in reverse, well, sorta.)

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://533337]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 14:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found