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

Solve the recurrence equations

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

1 Answer

+4 votes
Best answer

......

answered by Loyal (3.4k 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 Sep 2017
  1. Habibkhan

    6338 Points

  2. Warrior

    2220 Points

  3. Arjun

    2150 Points

  4. nikunj

    1980 Points

  5. manu00x

    1726 Points

  6. SiddharthMahapatra

    1718 Points

  7. Bikram

    1716 Points

  8. makhdoom ghaya

    1660 Points

  9. A_i_$_h

    1518 Points

  10. rishu_darkshadow

    1512 Points


25,981 questions
33,556 answers
79,367 comments
31,013 users