1 votes 1 votes T(n) = $\sum_{0}^{n-1}$ T(i) + cn Algorithms recurrence-relation algorithms time-complexity + – pC asked Jan 26, 2016 pC 404 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Arjun commented Jan 26, 2016 reply Follow Share If you do not know to solve, start from 0, and numerically substitute the values. This will work for objective exams and never gives wrong. 1 votes 1 votes pC commented Jan 26, 2016 reply Follow Share @arjun sir , it is the recurrence of your question https://gateoverflow.in/208/what-is-the-time-complexity You got T(2) as 5. I am not able to understand . Could you pls explain how to solve this using back substitution 0 votes 0 votes Arjun commented Jan 26, 2016 reply Follow Share I do not think that is back substitution. That method is just enumeration. For simplicity, assume c = 1. T(0) = 1. T(1) = T(0) + 1 = 2 T(2) = T(0) + T(1) + 2 = 5 and so on.. Then check options. Quick way for objective exams and no chance of negatives. 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes T(n) = T(n-1) + cn Ans) O(n^2) Prasanna answered Jan 26, 2016 Prasanna comment Share Follow See 1 comment See all 1 1 comment reply pC commented Jan 26, 2016 reply Follow Share O( 2^n ) is given answer ! 0 votes 0 votes Please log in or register to add a comment.