how to solve T(n) = T(n-1) + n using Iterative method and answer is theta(n^2)
T(n) = T(n-1) + n = T(n-2) + n-1 + n = ... = 1+ 2 + ... + n = (n+1)n/2 = theta(n^2)
note the assumption that T(0) = 0 (you must have base for the recursion)
hope that what you have meant
At times, you could also use characteristics equations method to solve recurrence relations. This involves determining Particular integral and total solution.
More information here: solving recurrence relations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With