Question: 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.

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 k ton j=n; while (j>1) j=j-m; k=7 7 Malt ALG2 (n) i=n; while (i>k) iri/m; for j ti to i print j; p=6 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
