The Wayback Machine - https://web.archive.org/web/20201103183854/https://github.com/TheAlgorithms/Java/pull/1651
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive Hanoi Algo #1651

Open
wants to merge 2 commits into
base: master
from

Conversation

@shreya10032000
Copy link

@shreya10032000 shreya10032000 commented Oct 6, 2020

Describe your change:

Added a new Algorithm Recursive Hanoi Tower.
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.

Response to fix Issue#1650

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Java files are placed inside an existing directory.
  • All functions and variable names follow Java naming conventions.
Copy link
Member

@dynamitechetan dynamitechetan left a comment

Thank you for the PR. Please name the file as per java conventions and end the filename with a .java extension.

@shreya10032000 shreya10032000 requested a review from dynamitechetan Oct 6, 2020
@shreya10032000
Copy link
Author

@shreya10032000 shreya10032000 commented Oct 6, 2020

The requested changes have been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.