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

单选题:下述Python程序段的时间复杂度为()

Luz4年前 (2022-10-15)题库371
下述程序段的时间复杂度为( )


a,b=n,0
while a>=b*b: b+=1


### 来源:
黄龙军, 等. 数据结构与算法(Python语言描述), 上海: 上海交通大学出版社, 2023. (In Press)





A.O(log$$_2$$n)
B.O(n)
C.O($$\sqrt{n}$$)
D.O(n$$^2$$)


答案:C