Any hints on how to solve $t(n) = t\left(\frac n2\right) + n^2$ with the iteration method? What I've got so far:
$$t(n)=n^2+t\left(\frac n2\right)$$
$$t(n)=n^2+\left(\frac n2\right)^2+t\left(\frac n4\right)$$
$$t(n)=n^2+\left(\frac n2\right)^2+\left(\frac n4\right)^2+t\left(\frac n8\right)$$
$$t(n)=\sum_{i=0}^{k-1}\frac {n^2}{4^i}+t(1)\text{ with }n=2^k\text{ and }k=\log_2n$$
$$t(n)=n^2\sum_{i=0}^{k-1}\frac 1{4^i}+t(1)$$
So the answer is O(${ n }^{ 2 }$), right?
– Chafic Oct 17 '13 at 21:54