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

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

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


m,n=100,200
while n>0:
c+=1
if m>100: m-=10; n-=1
else: m+=1


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






A.O(mn)


B.O(n)
C.O(m)

D.O(1)


答案:D