Google-Developer-Student-Club-CCOEW / Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE

Welcome to the Hacktoberfest 2023 Competitive-Programming Cohort for Cummins College and MMCOE students! To request issue assignment, create a pull request, providing: 1. Full Name 🧑‍🎓 2.Email 📧 3.College ID (RNO) 🔢 4.Branch of Study.📚 5. Year 📆 .The Cummins College and MMCOE students' PRs will be considered only. Thank you!
9 stars 69 forks source link

Tower of Hanoi #140

Open suryaprakashpandey opened 9 months ago

suryaprakashpandey commented 9 months ago

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

Subhashini014 commented 9 months ago

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.

Harikaran1729 commented 9 months ago

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!!

asryan11 commented 9 months ago

See PR #157

siya100 commented 9 months ago

hey @suryaprakashpandey!!! can you please assign me this issue as currently i am learning dsa in python and it would be a great practice

Mani1881 commented 9 months ago

hey @saakshii12 can u please assign this issue to me.i will write in java

vaishnavim141003 commented 8 months ago

I would like to work on this issue using python language . Name-Vaishnavi Mahajan.(UIN2022739) Cummins college of engineering.(SY) Can you please assign this issue to me .

vaishnavim141003 commented 8 months ago

issue resolved #140

On Sat, 21 Oct 2023 at 18:29, GDSC Cummins X MMCOE @.***> wrote:

Assigned #140 https://github.com/Google-Developer-Student-Club-CCOEW/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE/issues/140 to @vaishnavim141003 https://github.com/vaishnavim141003.

— Reply to this email directly, view it on GitHub https://github.com/Google-Developer-Student-Club-CCOEW/Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE/issues/140#event-10731278071, 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>