Hi there I am trying to solve the following recurrence relation by telescoping but I am stuck on the last step.
T(N) = T(N/2) + N T(1)=0
T(N/2) = T(N/4) + N/2
T(N/4) = T(N/8) + N/4
...
T(2) = T(1) + 2
T(N)= T(1) + N + N/2 + N/4
I think the answer is nlogn but I don't know how to interpret the above as nlogn. I can see that I am doing logn steps but where does the n come from?