in reply to Re^2: Recursion: the Towers of Hanoi problem
in thread Recursion: The Towers of Hanoi problem
Try this on:
New rules, no #! needed.
==
Kwyjibo. A big, dumb, balding North American ape. With no chin.
Now trying for the least number of chars. 116 in this solution.sub a{my$l=pop;a(@_[0,2,1],--$l)."Move disc $l from $_[0] to $_[2] ".a(@_[1,0,2],$l)if$l>0;}print a 'A'..'C',shift;
New rules, no #! needed.
==
Kwyjibo. A big, dumb, balding North American ape. With no chin.
In Section
Tutorials