[98448 views]
Tower of Hanoi, is a mathematical puzzle that consists of three towers. These rings are of varying sizes and stacked upon each other in ascending order. There are other variations of the puzzle where the number of disks increases, but the tower count remains the same.
Source: Wikipedia
1.The top disk can be moved only. 2.Only one disk can be moved at a time. 3.No large disk sits above a small disk.
With 3 disks, the puzzle can be solved in 7 moves. The minimal number of moves required to solve a Tower of Hanoi puzzle is 2^{n} - 1, where n is the number of disks.
In the above algorithm,
Error in step 6 of algorithm, *dest is wrong. n-1 disks should be moved to the source.
Use Below Search to get Best Discounts Online