Solving a recursive relationship using the iteration method

how to solve T(n) = T(n-1) + nusing the Iterative method and answertheta(n^2)

+3
source share
2 answers
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 a base for recursion)
I hope you had in mind

+7
source

Sometimes you can also use the method of characteristic equations to solve recurrence relationships. This includes the definition of a particular integral and complete solution.

More information here: solving recurrence relationships

+1
source

All Articles