✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
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]
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!