Return to list Post a new post

[Q&A]

how to complete tower of hanoi, What are the tricks to complete the Tower of Hanoi game?

83 1
Post Time 2024-10-2 10:41 | View all Read mode

Register now to join Ufos Travel and make travel friends around the world

Login to follow friends and send messages. No Account? Register

×
How to Solve the Tower of Hanoi

Review1

Linda JeffersonLv.1 Post Time 2024-10-26 03:59 | View all
1. The Hanoi Tower, also known as the River Tower Problem, originated from an ancient Indian puzzle toy. When creating the world, three diamond pillars were made, and 64 golden disks were stacked in size order from bottom to top on one pillar. The disks were then rearranged in size order from bottom to top on another pillar, and it was stipulated that the disks could not be enlarged on the small disk, and only one disk could be moved between the three pillars at a time.

2. The first step for ABC three needles is to move the first n-1 from A to B, the last time is to move n to C, the second step is to move n-1 from B to C, and the last time is to move 1 to C, which is the termination condition. It will not stop until n=1, and then continue to return to this line and run the following code every time. Note that here the parameter xyz starts calling itself, so the parameter order changes.

Reply

You have to log in before you can reply Login | Sign up

Points Rules

Complaints/Suggestions Contact

[email protected]

Unauthorized Reproduction, Copying and Mirroring Are Prohibited.
Any Violation, Held Legally Accountable
  • Android APP
  • IOS APP
Copyright ©copy 2021-2024 Ufos Travel All rights reserved All Rights Reserved. 2024-11-21 04:25 GMT-8 Processed in 0.181097 second(s), 31 queries .
Turn off the lights Publish One Post
WhatsApp
Back to top
Quick Reply To Top Return to the list