Tower of Hanoi is a mathematical puzzle. It is also known as Tower of Brahma or Locus' Tower. This puzzle consist of three rods in which disks can slide.
There are some number of disks are placed on a rod in increasing order of their disk size form top to bottom. Now we have to transfer all the disk to another rod. Keeping in mind that.
- Only one disk can be moved at a time.
- Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack i.e. a disk can only be moved if it is the uppermost disk on a stack.
- No disk may be placed on top of a smaller disk.
No comments:
Post a Comment