Question: 1. (a) Give pseudocode for an algorithm that runs in O( n time 6 marks) Hint: consider an algorithm whose input is an m m

1. (a) Give pseudocode for an algorithm that runs in O( n time 6 marks) Hint: consider an algorithm whose input is an m m matrix. So, the size n of the input is m m and hence any O(m) algorithm is an algorithm. b) Give pseudocode for an algorithm that runs in O(n * n) time. (7 marks) (e) Give pseudocode for an algorithm that runs in O(n2(7 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
