Question: any help? Consider the following algorithm, given in pseudo-code, that takes as input a list L containing n numbers and returns 1 if the list
Consider the following algorithm, given in pseudo-code, that takes as input a list L containing n numbers and returns 1 if the list is "sparse", i.e., more than half of its elements are 0's, and 0 otherwise. 2.2. [3 marks] Use the asymptotic notation introduced in class to describe the best-case running time complexity of algorithm Check. Explain your answer. (Show your calculations.) 2.3. [3 marks] Use the asymptotic notation introduced in class to describe the worst-case running time complexity of algorithm Check. Explain your answer. (Show your calculations.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
