Question: Implement the Hanoi Tower function that returns the sequence of commands to move n disks from pole A to pole C . We consider the
Implement the Hanoi Tower function that returns the sequence of commands to
move disks from pole to pole
We consider the class Array that you have created and we wish to insert
elements in the array. We consider cases for the implementation of the insert
function
Case : Add element in memory each time you insert a new element.
Case : Add a property capacity corresponding to the amount of elements that
have been allocated, and the size corresponds only to the number of elements
in the array. At each insert, if the capacity is full, then you double the size of the
array.
Add a property in your class to count how many times you copy an element, so you
can track the number of operations during your tests.
Using functions to measure the time. Compare the duration for inserting
elements in the array. Repeat the operations times, and report the mean and
standard deviation of the duration
Remarks: you can use an array to store the measurements, and you should
implement the mean and standard deviation functions as well search in Wikipedia
if you don't know the equation of the standard deviation
Report the values that you have obtained directly in the code as comments, with
information about your machine eg CPU
do the following code in C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
