Analysis Of Algorithm, Algorithms, Recursion, Recurrence Relation, Discrete Mathematics.
required by each line within the function, the recurrence relation formed is: When n = 0, which is our base case: T(n) = 1 When n > 0, T(n) = 1 + 1 + T(n-1) .:T(n)= T(n-1) + 2 Since, 2 is a constant, we can asymptotically write: T(n) = T(n-1) + 1 in short: when n = 0, which is our base case: T(n) =