Can someone please help me with this ?
Use iteration method to solve it. T(n) = T(n-1) +n
Explanation of steps would be greatly appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
and so on you can substitute the value of T(n-1) and T(n-2) in T(n) to get a general idea of the pattern.
For base case:
=> k = n – 1
substitute in (1)
Which you can see is of Order n2 => O(n2).