Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Hanoi

by teamster_jr (Curate)
on Jun 20, 2003 at 09:00 UTC ( #267492=note: print w/ replies, xml ) Need Help??


in reply to Hanoi

Here's the non vt100 version for those that can't see the other

sub d{for(1..$d){for$p(0..2){{$s=$$p[$d-$_]||"|";$f=$"x(($d*2-1-length +$s )/2);printf"$f$s$f"}}print$/;}select$q,$q,$q,(print$/)/3}push@0,"-"x(1 +-2 *$_)for-($d=shift||3)+1..0;sub h{my($n,$s,$d,$i)=@_;if($n>0){h($n-1,$s +,$ i,$d);push@$d,pop@$s;d;h($n-1,$i,$d,$s)}}d;h($d,0,2,1)

al


Comment on Re: Hanoi
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2015-07-06 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls