Question: For the following function that accepts as input a listlst, identify the tightest simple bound of the worst-case computational complexity in terms of the size
For the following function that accepts as input a listlst, identify the tightest simple bound of the worst-case computational complexity in terms of the size of the inputn = len(lst)and justify your answer.
def pick_selection(lst): selection = [] n = len(lst) k = n//2 for i in [0,k,n-1]: selection.append(lst[i]) return selection
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
