Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Recursion: the Towers of Hanoi problem

by MistaMuShu (Beadle)
on Oct 19, 2004 at 23:30 UTC ( #400700=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print "Move disk $num from $from to $to\n";
    movedisks( $num-1, $aux, $to, $from );
    
  2. or download this
    $numdisks = 3
    movedisks( 3-1, A, C, B) 
    movedisks( 2-1, A, B, C) 
    print "Move disk 1 from A to B" for the base case
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-08-29 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls