Question: Please help. I have to adjust the code to calculate run time for any amount of disks. So it has to tell the amount of

2. Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod. 3. No disk may be placed on top of a disk that is smaller than it. Let first see the animation: https://liveexample.pearsoncmg.com/dsanimation/TowerOfHanoi.html The code for the Tower of Hanoi can be found here https://liveexample.pearsoncmg.com/html/TowerOfHanoi.html This is a recursive solution that consist of three steps Step 1 - Move n-1 disks from source to aux-recursion Step 2 - Move nth disk from source to dest - this is constant Step 3 - Move n-1 disks from aux to dest - recursion Steps 1 and 3 use the same function but towers name are changed. Pretty much we keep moving our di: around to stay with the puzzle rules. We must move them from one tower to another many times, recursic function calls itself many times and runtime grows exponentially. We won't discuss this in detail: you can trac the algorithm and see it yourself or find a suitable explanation online. Our goal is to see the exponential growti 4.3. Provhig with practice: Use httos://liveexample.pearsoncmg.com/htmi/TowerOfHanoi.html Adiust code to calculate run time. You will populate the table below using the number of disks: TASK 7. Adjust the code to calculate Tower of Hanoi run time. Populate the table. Provide
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
