单选题

设某算法的时间复杂度函数的递推方程式T(n)=T(n-1)+n (n为正整数)及T(0)=1,则该算法的时间复杂度为()。

A.

O(log n)

B.

O(nlong n)

C.

O(n)

D.

O(n2)

发表评论

登录 后再回复