Tower of Hanoi
Let me first explain about Tower of Hanoi. Tower of Hanoi is a mathematical game or a puzzle.
It have 3 rods and a number of different sized disks, which can slider on any rod. The smallest disk must be at top thus it makes a conical shape. The puzzle starts with the disks in a neat stack in ascending order of size on one rod.
We have to obey some rules:
1. Only one disk can be moved at a time.
2. Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
3. No larger disk may be placed on top of a smaller disk.
We can solve Tower of Hanoi problem using recursion. We have tried to explain it to you as simple as we can. Watch the video to understand the solution to Tower of Hanoi using Recursion