Given the flowing piece of code, in the worst case it is big-Θ of what (where the input is of size n)? Foo(A) 1 k = 0 2 for i = 1 to A.length 3 A[i] = A[i] + 1 4 for j = 1 to A. length - i 5 A[j] = A[j] * A[i] 6 if A[j] > 20 7 k = k + 1 8 A[i] = k 9 for i = 1 to A.length / 2 10 exchange A[i] with A[A.length + 1 - i]
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here