Back to the 2024 paper

Module 1: Introduction

20247m

Suppose the number of basic operations in an algorithm is defined as: T(n)=T(n1)+nT(n) = T(n-1) + n, with T(1)=1T(1) = 1.
Solve this recurrence using the substitution method and determine the time complexity.

Similar questions