学习算法之前,先介绍统一一下衡量算法复杂度的符号系统,尤其时间复杂度:
-
O (<=),f(n) = O(g(n))严格化定义为:
BigO.png -
Ω (>=),Lower bounds
BigOmega.png -
Θ (≈),tight bounds
BigTheta.png o (<),
-
ω (>),
littleo_litleomega.png
Notation:
All Image are refered from 6.046J of MIT.
更多关于算法的内容可参考本人博客:老香椿(https://laoxiangchun.cn/tags/Algorithm/)