✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
1. What is normally meant to be the input size if the algorithm’s input is i) an integer (numeric algorithm), ii) collection of elements or iii) a string? What do we count when calculating the time complexity of an algorithm? [3]
2. Assuming that f(n) = O(logn) and g(n) = O(nlogn), what should be f(n) * g(n)? Why? Simplify the resulting expression. [3]
3. What is the worst-case time complexity of this function? Explain. When providing your analysis, don't forget to specify what is the input size. [4]
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!