People often use recursive algorithms. Discuss the difference between direct recursion and indirect recursion. In which situations would a direct or indirect recursion be a better choice to use?
a)(i). People often use recursive
(ii). Two Level 200 IT students, James and Morris, are discussing how to compare two algorithms for solving a given problem. James suggests that they should use the execution times of the algorithms as criterion; but Morris insists that they should use the number of statements the algorithms execute as criterion.
(α)Explain the reasons why both criteria they are considering are not good for comparing algorithms.
(β)Recommend an ideal solution/criterion that they should rather use for comparing algorithms. Give a practical example to illustrate your answer.
Step by step
Solved in 2 steps