Anonymous user
Towers of Hanoi: Difference between revisions
→{{header|Ruby}}
Line 1,920:
# Example:
# solve([5, 4, 3, 2, 1], [], [])
# Note this will also solve randomly placed disks
# "place all disk in target with legal moves only".
def solve(*towers)
# total number of disks
|