<s>[INST] Algorithm - iteration method 
$$\begin{align} &T(n)=n+T(n-1)= \\ 
&= n + (n-1)+T(n-2)= \\ 
&= n + (n-1)+(n-2)+T(n-3)= \\ 
&= n + (n-1)+(n-2)+...+2+T(1)= \\
&= \frac{n(n+1)}{2}-1+T(1) \\
& \mathrm{Hence,} \ T(n)=\frac{n^2+n}{2}-1+T(1)=\Theta(n^2) 
\end{align} $$

What is $n(n+1)$?
 [/INST] $T(n) = n + (n-1) + (n-2) + ... + 2 + T(1)$
$\quad\quad\; = n + (n-1) + (n-2) + ... + 2 + 1 - 1 + T(1)$
$\quad\quad\; = (\sum_{i=1}^{n} i ) - 1 + T(1)$
$\quad\quad\; = \frac{n(n+1)}{2} - 1 + T(1)$
</s>