You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
292 B
9 lines
292 B
3 years ago
|
复杂度的计算是算法中至关重要的一个知识点
|
||
|
|
||
|
## 时间复杂度
|
||
|
|
||
|
O(1) 无论输入的量级有多大,始终都保持相同计算量
|
||
|
O(n) 计算量和输入的量级成正比,即输入量级越大计算量越大
|
||
|
O(n^2) 计算量是输入量级的平方
|
||
|
|
||
|
## 空间复杂度
|