Question: 1. (a) Give pseudocode for an algorithm that runs in O(n log n) time. (4 marks) (b) Give pseudocode for an algorithm that runs in

1. (a) Give pseudocode for an algorithm that runs in O(n log n) time. (4 marks) (b) Give pseudocode for an algorithm that runs in O(logn) time. (5 marks) (c) Give pseudocode for an algorithm that runs in O(n2 * logn) time. (5 marks) (d) For each of the following algorithms state whether it runs in Olog n) time? If it does, give a brief explanation If it does not, state the runtime using the O-notation (2 marks) for(i=1,1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
