This answer is restricted. Please login to view the answer of this question.Login Now
Tower of Hanoi (TOH) is a mathematical puzzle which consists of three pegs named as origin, intermediate and destination and more than one disks. These disks are of different sizes and the smaller one sits over the larger one.
In this problem we transfer all disks from origin peg to destination peg using intermediate peg for temporary storage and move only one disk at a time.
Algorithm for TOH problem:
To move a tower of n disks from source to destination
Example for 3 disks: 7 moves
Click here to submit your answer.