Suppose T(n) satisfies
T(0) = 0
and
T(n) = T(n-1) + 2n - 1, for any n > 0.
Expand the recurrence to get a formula for T(n).
Hint is will be a very short expression involving n. Follow the examples from lecture and from the practice question. That means you'll expand until you get T(n - n) plus a number of terms that can be condensed using a summation formula.
If you have any queries please comment in the comments section I will surely help you out and if you found this solution to be helpful kindly upvote.
Solution :
Get Answers For Free
Most questions answered within 1 hours.