I got stuck at the solution to the recurrence equation $T(n) = 2 T\left(\frac{n}{2}\right) + 2$.
Please give me a detailed explanation or references with detailed steps?
Sorry, I missed something.
If $n = 2$, then $T(n) = 1$; else if $n > 2$, then $T(n) = 2T\left(\frac{n}{2}\right) + 2$;
And a solution is suggested as: $T(n) = \frac{3n}{2} - 2$
Any comments about good books on recurrence relation? Thanks in advance.