-->
当前位置:首页 > 题库 > 正文内容

判断题:Let n be a non-negative integer representing the size of input.

Luz4年前 (2022-01-18)题库877
Let $$n$$ be a non-negative integer representing the size of input. The time complexity of the following piece of code is $$\Theta (n^2)$$.

int func(int n){
int sum = 0;
for(int i = 1; i < n; i *= 2)
for(int j = 0; j < i; j++)
sum++;
return sum;
}


答案:FALSE

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。