This is a recurrence question. I need to solve it using recurrence.
$$T(n)=2T(n−1)+(n-1) \quad T(0) = 0$$
Could somebody please solve it.
p.s: This is not a homework question. My algorithm exams are coming up and I was trying to solve this
Edit: I tried solving this using the recursive approach i.e. substitute the value to T(n-1) and then substitute T(n-1) with T(n-2) and so on and so forth. After this I generalise it using k. Since T(0) = 0, I then equate the generalised term inside T to 0 and solve for k in terms of n. After which I substitute the value of k in the generalised equation leaving me with terms containing n
only. However I don't reach the desired solution which is 2ˆn + n - 1