The Hanoi Towers algorithms moves
disks from the Source rod to the Destination rod using Auxiliary rod so
that only a smaller disk can be bigger disk in any time. It is a
problem, which which requires 2N-1 steps, where N is a number
of disks, see Fig.1. If a recursive solution is used, algorithm is quite simple. A solution in the Flowgorithm using matrix libraty [2D arrays indexed from (1,1)] - DOWNLOAD zip file (not valid yet) |
![]() Fig. 1 - Initial and final positions |
|