-->
当前位置:首页 > 题库

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

Luz5年前 (2021-05-10)题库1271
Let $$n$$ be a non-negative integer representing the size of input. The time complexity of the following piece of code is: @[B](2)
```
x = 0;
while ( n >= (x+1)*(x+1) )
x = x+1;
```

A. $$O(log n)$$
B. $$O(n^{1/2})$$
C. $$O(n)$$
D. $$O(n^2)$$




A.$$O(log n)$$
B.$$O(n^{1/2})$$
C.$$O(n)$$
D.$$O(n^2)$$


答案:B