Question: def foo(L): if len(L) < 2: return L A = first third of L B = second third of L C = last third of
def foo(L): if len(L) < 2: return L A = first third of L B = second third of L C = last third of L # This extra work is Theta(n) A = reverse(A) B = reverse(B) C = reverse(C) return foo(A) + foo(C)
What are the values of a, b, and k that would be used to determine the complexity of the "algorithm"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
