mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-07 15:01:58 +08:00
Update code comment of quadratic in time_complexity (#1155)
This commit is contained in:
@ -34,7 +34,7 @@ def array_traversal(nums: list[int]) -> int:
|
||||
def quadratic(n: int) -> int:
|
||||
"""平方阶"""
|
||||
count = 0
|
||||
# 循环次数与数组长度成平方关系
|
||||
# 循环次数与数据大小 n 成平方关系
|
||||
for i in range(n):
|
||||
for j in range(n):
|
||||
count += 1
|
||||
|
Reference in New Issue
Block a user