The Tower of Hanoi puzzle is as follows: There are three vertical pegs, usually attached to a board. On the middle peg are stacked several disks of decreasing radius (of course each disk has a hole in its center for the peg)
The object is simple: Move the tower of disks to another peg, given two restrictions:
The algorithm as a Nassi Shneidermann diagram:
Procedure move(int n_rings, peg from, peg to, peg over):
Last modified: 27/July/98 (12:14)