Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 517 Bytes

Algorithms.md

File metadata and controls

14 lines (12 loc) · 517 Bytes

Algorithms 算法

时间复杂度

说明
O(1) 常数阶 没有循环
O(logN) 对数阶 i = i * 2
O(n) 线性阶 i++
O(nlogN) 线性对数阶 i++ & i = i * 2
O(n²) 平方阶 两层循环
O(n³) 立方阶 三层
O(n^k) K次方阶
O(2^n) 指数阶