Analysis Of Algorithm, Algorithms, Recursion, Recurrence Relation, Discrete Mathematics.
is reached, time taken to for the function t execute is constant, which is 1. Now how can we calculate time complexity of the algorithm with these recurrence relations? From the recurrence relations above: Since T(n) = T(n-1) + 1 ... Let's call this equation 1 then by SUBSTITUTING n-1 in place of n