hanshulll / CodeCollection

Do push code on which you are working or if you have solved any problem in any language add the solution to this repository and help to contribute and star this repository!!Refer CONTRIBUTING.md for contributions!!
MIT License
219 stars 597 forks source link

Create tower_of_hanoi.cpp #827

Closed ayushkwal closed 2 years ago

ayushkwal commented 2 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.

welcome[bot] commented 2 years ago

Thanks for opening this pull request! 🤗 Your PR will be reviewed and merged soon !! In the mean time don't forget to give a star to this repo !! Wishing you a great Hacktoberfest 2021 🙌 🎉 ⚡️

Show some ❤️

welcome[bot] commented 2 years ago

Congrats on merging your pull request! 🙌🎉⚡️ Show some love by starring a few of my repositories.