Find Jobs
Hire Freelancers

programming - Towers of Hanoi - C++

$30-250 USD

Закрито
Опублікований over 11 years ago

$30-250 USD

Оплачується при отриманні
I need someone to write for me the towers of hanoi game in c++ language. Question is : Every budding computer scientist must grapple with certain classic problems, and the Towers of Hanoi (see Fig. 5.19) is one of the most famous of these. Legend has it that in a temple in the Far East, priests are attempting to move a stack of disks from one peg to another. The initial stack had 64 disks threaded onto one peg and arranged from bottom to top by decreasing size. The priests are attempting to move the stack from this peg to a second peg under the constraints that exactly one disk is moved at a time, and at no time may a larger disk be placed above a smaller disk. A third peg is available for temporarily holding the disks. Supposedly the world will end when the priests complete their task, so there is little incentive for us to facilitate their efforts. Let’s assume that the priests are attempting to move the disks from peg 1 to peg 3. We wish to develop an algorithm that will print the precise sequence of disk-to-disk peg transfers. If we were to approach this problem with conventional methods, we’d rapidly find ourselves hopelessly knotted up in managing the disks. Instead, if we attack the problem with recursion in mind, it immediately becomes tractable. Moving n disks can be viewed in terms of moving only n – 1 disks (and hence the recursion) as follows: a) Move n – 1 disks from peg 1 to peg 2, using peg 3 as a temporary holding area. b) Move the last disk (the largest) from peg 1 to peg 3. c) Move the n – 1 disks from peg 2 to peg 3, using peg 1 as a temporary holding area. The process ends when the last task involves moving n = 1 disk, i.e., the base case. This is accomplished by trivially moving the disk without the need for a temporary holding area. Write a program to solve the Towers of Hanoi problem. Use a recursive function with four parameters: a) The number of disks to be moved b) The peg on which these disks are initially threaded c) The peg to which this stack of disks is to be moved d) The peg to be used as a temporary holding area Your program should print the precise instructions it will take to move the disks from the starting peg to the destination peg. For example, to move a stack of three disks from peg 1 to peg 3, your program should print the following series of moves: 1 →3 (This means move one disk from peg 1 to peg 3.) 1 → 2 3 → 2 1 →3 2 →1 2 →3 1 →3
ID проекту: 4010996

Про проект

25 пропозицій(-ї)
Дистанційний проект
Активність 11 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
25 фрілансерів(-и) готові виконати цю роботу у середньому за $50 USD
Аватарка користувача
Hi, I have solved this before, I can provide you a well documented code and solution in less than 24 hours. Let me know if you are interested so I can start. Thanks.
$30 USD за 0 день
5,0 (625 відгуки(-ів))
7,2
7,2
Аватарка користувача
Hello. I'll provide perfect solution for you.
$30 USD за 1 день
5,0 (16 відгуки(-ів))
5,1
5,1
Аватарка користувача
I can do it. I will solve your project very fast.
$30 USD за 1 день
5,0 (9 відгуки(-ів))
4,4
4,4
Аватарка користувача
I can give you program within few hours. Thanks.
$30 USD за 1 день
5,0 (7 відгуки(-ів))
4,3
4,3
Аватарка користувача
I could help you in this project
$88 USD за 2 дні(-в)
5,0 (9 відгуки(-ів))
3,9
3,9
Аватарка користувача
Hello, I have already done a similar assignment before and can surely help you in a timely manner!
$30 USD за 1 день
4,9 (3 відгуки(-ів))
3,6
3,6
Аватарка користувача
Hi sir. I can help you!
$30 USD за 0 день
5,0 (1 відгук)
3,3
3,3
Аватарка користувача
I have done it already, I can give you the code immediately
$30 USD за 5 дні(-в)
5,0 (10 відгуки(-ів))
3,2
3,2
Аватарка користувача
let's do it.
$250 USD за 14 дні(-в)
5,0 (4 відгуки(-ів))
3,3
3,3
Аватарка користувача
Hello there, please let me do this for you. Thanks
$35 USD за 1 день
5,0 (3 відгуки(-ів))
1,8
1,8
Аватарка користувача
I've already have the code done.I can do it in no time and start whenever you are ready
$30 USD за 0 день
4,9 (3 відгуки(-ів))
1,6
1,6
Аватарка користувача
kindly check your pmb
$30 USD за 0 день
5,0 (1 відгук)
1,2
1,2
Аватарка користувача
Can I do it?
$30 USD за 0 день
5,0 (1 відгук)
1,0
1,0
Аватарка користувача
Hello, Soft Studio is the indian based group which deals the satisfaction with dedicated client to developer communication and 100% surety. we have develop more than 100 websites module with integrity and consistency . we have done 10 plus programming in c and c++ and develop more than 10 games. so this project is very handy for us. so give us one chance to deliver our faith in your project. Thanks soft Studio
$100 USD за 7 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
Dear Sir/Madam, I have plenty of experience with algorithm design problems and this is one of them. I have been participating in a lot of competitions such as ACM ICPC and this is no problem for me. I can finish the job for you in less than a day. I am available on Skype, GoogleTalk, E-mail, ... Yours faithfully, Nikola Stojiljkovic
$40 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
Hello, I am a professional C++ developer with lots of algorithm and educational experience. I can solve this for you. Thanks and best of luck.
$60 USD за 2 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
Hello! I have extensive experience in those types of projects. The project will be fully commented. Regards Cleo
$30 USD за 2 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
I am expert c++ programmer. More than 2 years experience. 100% satisfaction.
$30 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
We are freelance software developers. If you contact me I can give a quote for your project and we can discuss the details. <b><i>Removed by Admin</i></b>
$140 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
I can do it.
$30 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор UNITED ARAB EMIRATES
United Arab Emirates
0,0
0
На сайті з груд. 4, 2012

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.