Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: sort with fewest moves

by jlongino (Parson)
on Feb 12, 2002 at 08:33 UTC ( #144814=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    my @slots;
    ...
    sub build_hash {
      $rlookup{$slots[$_]} = $_ for (0..$max);
    }
    
  2. or download this
    0 2 3 7 6 4 10 5 8 9 1  $empty: 0  move(1, 0);
    2 0 3 7 6 4 10 5 8 9 1  $empty: 1  move(10, 1);
    ...
    Average Moves: 9.33333333333333
    Minimum Moves: 8
    Maximum Moves: 11
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2022-01-26 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (69 votes). Check out past polls.

    Notices?