This is the Towers of Hanoi program with the following modifications:
1) There are five pegs, namely 1,2,3,4, and 5.
2) In the initial configuration peg 1 has all the disks. Disks are numbered from 1 (the smallest) to n (the largest), and the goal is to move all the disks to peg 5 obeying the rules of the game: perform one disk move at a time, and never place a larger disk on a smaller disk.
Write a program that solves the above problem. You are required to use stacks on each peg to store the disks on that peg. So a move from peg i to peg j will require a pop on the stack for peg i and a push on the stack for peg j.
After your function executes, pop all the elements off of peg 5, output the disk numbers to show that your function has performed correctly.
Your function must also count the number of disk moves, and after all the disks are moved, it must output the total number of disk moves performed.
We will test your program with various values of n including the following:
• n=16,
• n=32.
I can deliver good quality code in best time possible. I can guarantee that once u get it done by me, next time u would return to me. I know I am new here but u will see I am no new to programming.
Done with enough marketing of myself, Rest is of course your choice :)
I have a lot of free time, and these days i work with c++ on a daily basis, so I can go right to the task and get the job done, I come from c programming so i'm good with algorithms. This is the first time on this site and that's why I don't have much reputation - but I do have experience.