Question: k = 5 m = 4 p = 9 Question 5 (30p) Four algorithms are given below, where n is the input size. Replace k,

k = 5
m = 4
p = 9
Question 5 (30p) Four algorithms are given below, where n is the input size. Replace k, m and p with the values in Question 1. Analyze calculate the worst case time complexity of the algorithms and give your results in (.). ALGI (n) for it kto n jen; while (j>1) j=j-m; ALG2 (n) i=n; while (i>k) i=i/m; for je i to i print j; ALG3 (n) if n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
