itsakshayv / Hacktoberfest2020-contribution

This repository is for Hacktober fest 2020.you can create any program in Any Language.
2 stars 44 forks source link

Tower of Hanoi #11

Closed Yatindra29 closed 4 years ago

Yatindra29 commented 4 years ago

Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire stack to another rod, obeying the following simple 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 i.e. a disk can only be moved if it is the uppermost disk on a stack. 3) No disk may be placed on top of a smaller disk.