Question: 2 Runtime analysis (15 pts) Consider the following algorithm: 1: SillyME(A[O.. (n 1)]) for i=0 ton - 1 for j = 0 to i -

2 Runtime analysis (15 pts) Consider the following algorithm: 1: SillyME(A[O.. (n 1)]) for i=0 ton - 1 for j = 0 to i - 1 for k = 0 to 99 A[i] = A[j]+k c (a) (10 pts) Compute the exact number of times line 5 will execute. Show your work. (b) (5 pts) State the asymptotic running time of SILLYME(A[O..(n 1)) using notation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
