Given the pseudo-code for a recursive function foobar, answer the following questions.
foobar(A, k):
# A is a list of n integers and k is a small positive integer.
# Assume $n = k^d$ (int $d > 0$).
let $u = \frac{n}{k}$
if u == 1:
print "Reached base case."
else:
for i = 1, 2, ..., n:
print the i-th element of A
divide A into k sublists, $A_1, A_2, ..., A_k$, each with u integers
for i = 1, 2, ..., k:
foobar($A_i$, k)
1) (4 marks) Write its running time T(n) in a recurrence relation.
2) (8 marks) Derive a closed form formula for T(n). Show detailed intermediate steps.
3) (3 marks) Write and explain its computational complexity using the O-notation.