-
Notifications
You must be signed in to change notification settings - Fork 69
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
Tower of Hanoi #140
Comments
hello @suryaprakashpandey could you please assign me this issue currently I am preparing Data Structures and Algorithms using java it would be very helpful to me if assign this issue to me. |
Hello @suryaprakashpandey ... Could you please assign me this issue? I am currently a beginner to Opensource and I am learning C programming. I wish to contribute to this issue. Thank you!! |
See PR #157 |
hey @suryaprakashpandey!!! |
hey @saakshii12 can u please assign this issue to me.i will write in java |
I would like to work on this issue using python language . |
issue resolved #140
…On Sat, 21 Oct 2023 at 18:29, GDSC Cummins X MMCOE ***@***.***> wrote:
Assigned #140
<#140>
to @vaishnavim141003 <https://github.com/vaishnavim141003>.
—
Reply to this email directly, view it on GitHub
<#140 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2TPB6SXKSAXE55D5ZS2RGLYAPBKPAVCNFSM6AAAAAA5PEODESVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG4ZTCMRXHAYDOMI>
.
You are receiving this because you were assigned.Message ID:
<Google-Developer-Student-Club-CCOEW/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE/issue/140/issue_event/10731278071
@github.com>
|
Write code in the preferred language and attach output with it.
The Tower of Hanoi game consists of three stacks (left, middle and right) and n round disks of different sizes. Initially, the left stack has all the disks, in increasing order of size from top to bottom.
The goal is to move all the disks to the right stack using the middle stack. On each move you can move the uppermost disk from a stack to another stack. In addition, it is not allowed to place a larger disk on a smaller disk.
Your task is to find a solution that minimizes the number of moves.
Input
The only input line has an integer n: the number of disks.
Output
First print an integer k: the minimum number of moves.
After this, print k lines that describe the moves. Each line has two integers a and b: you move a disk from stack a to stack b.
Example:
Input: 2
Output:
3
1 2
1 3
2 3
The text was updated successfully, but these errors were encountered: