I have this code:
if n is even
{
for i=1....n
for j=1...i
print j
return 8*foo(n/2)
}
Asking to calculate the running time $T (n)$. I thought at first that I can write the function like this:
$$T(n)= 8T(n / 2)+n^2$$ But according to the answers of the quiz, they are saying that the function looks like this:
$$T (n)= T(n / 2)+n^2$$ Why we can delete 8? Thank you very much!
foo
eight times but rather just multiplying the result offoo
by eight. $\endgroup$ – Auberon May 16 '16 at 18:11