Skip to content

Commit e7a22a3

Browse files
committed
update
1 parent 05e352e commit e7a22a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

JavaKnowledge/数据结构和算法/算法.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
显然,由此算法时间复杂度的定义可知,我们的三个求和算法的时间复杂度分别为O(n),O(1),O(n²)。
3030
我们分别给它们取了非官方的名称,O(1)叫常数阶、O(n)叫线性阶、O(n²)叫平方阶。
3131

32-
32+
- O(1) : 操作所需的时间是常数(n个元素所需的时间与一个元素所需的时间相同)
33+
- O(n) : n个元素的时间是一个元素时间乘以n
34+
- O(n²): n个元素的时间是一个元素时间乘以n²
3335

3436
#### 推导大O阶方法
3537

0 commit comments

Comments
 (0)