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

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

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

void func(int n){
int i = 0;

while(i * i * i <= n)
i++;
}




A.$$O(n) $$
B.$$O(\log_3n) $$
C.$$O(n^{1/3}) $$
D.$$O(n^3) $$


答案:C

发表评论

访客

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