[Solved] 605-202 Project2-Recursion

30 $

File Name: 605-202_Project2-Recursion.zip
File Size: 244.92 KB

SKU: [Solved] 605-202 Project2-Recursion Category: Tag:

Or Upload Your Assignment Here:


Write a program to solve the Towers of Hanoi problem for a tower of size n, using both recursion and iteration. Time each method separately. Be very carefull to time only the actual work and avoid superfluous module calls and initialization, etc. Compare and contrast your two versions of the problem. Are they what you expected? Your analysis must contain a table of the times obtained for each run.

For a tower of a particular size, your output should consist of a list of moves that must be made as well as the times obtained. Disk 1 is always the top disk. Print your output to a file, not the screen.

E.g. for a tower of size two

Move disk 1 from tower A to tower C Move disk 2 from tower A to tower B

Move disk 1 from tower C to tower B

Run each version for the values n=1,2,3…50 or until you time out.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] 605-202 Project2-Recursion
30 $