GATE CSE
First time here? Checkout the FAQ!
x
0 votes
111 views

Solve the recurrence equations

  • $T(n) = T(n - 1)+ n$
  • $T(1) = 1$
asked in Algorithms by Veteran (30.3k points)   | 111 views

1 Answer

+4 votes
Best answer

......

answered by Loyal (3.3k points)  
selected by
T(n) = T(n-1)+n

          =T(n-2)+n-1+n

          =T(n-3)+n-2+n-1+n

            .

            .

            .

             .

T(n) = 1+2+3+4+5+6+7..........+(n-1)+n

        = n(n+1)/2


Top Users Jul 2017
  1. Bikram

    3960 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1848 Points

  4. joshi_nitish

    1654 Points

  5. Arjun

    1290 Points

  6. Hemant Parihar

    1184 Points

  7. Arnab Bhadra

    1100 Points

  8. Shubhanshu

    1052 Points

  9. Ahwan

    900 Points

  10. rahul sharma 5

    702 Points


24,018 questions
30,955 answers
70,327 comments
29,337 users