Question: QUESTION ONE [ 1 4 MARKS ] a ) An experiment was carried out to test the efficiency of an algorithm. The algorithm was coded

QUESTION ONE
[14MARKS]
a) An experiment was carried out to test the efficiency of an algorithm. The
algorithm was coded and run on two different computers with similar
specifications and the execution time was used to compute the time complexity
(efficiency). Explain with your knowledge in asymptotic analysis why execution
time is not a good measure for evaluating the efficiency of an algorithm.
[3 marks]
b) Draw the structure of an array A given below after executing the following.
[3 marks]
Start
Set i=2
A[i]=A[i-2]+A[i-1]
i=i+1
Go to Step 3 while i8
Stop
A
c) Draw a stack using a linked list with the following list: 7,12,8. Read the list
from left to right.
Draw the stack after performing the following operations:
B. A. WEYORI & N. S. AWARAYI
QUESTION ONE [ 1 4 MARKS ] a ) An experiment was

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!