单选题:Let n be a non-negative integer representing the size of input.
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
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