forked from go/golangs_learn
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.
8 lines
399 B
8 lines
399 B
3 years ago
|
# 简单判断时间复杂度
|
||
|
|
||
|
* 快速判断算法复杂度
|
||
|
* 确定问题规模n
|
||
|
* 循环减半过程 => log n (只要问题规模出现**循环减半**情况,则使用**对数**描述时间复杂度)
|
||
|
* k层关于n的循环 => n<sup>k</sup> (只要问题规模出现**多层循环**情况,则使用**次幂**描述时间复杂的)
|
||
|
|
||
|
* 复杂情况:根据算法执行过程判断
|