- Principles:
Complexity of O ( n 2 ) \mathcal{O}(n^2) O(n2) is not feasible. We’d like linear complexity O ( n ) \mathcal{O}(n) O(n), or linearithm O ( n l o g ( n ) ) \mathcal{O}(nlog(n)) O(nlog(n)). - tilde notation
∼
\sim
∼
The highest order of the complexity with the same coefficient.
Tilde means the limit of the ratio of the two elements approaches 1.
eg: ∼ 1 2 n \sim\frac{1}{2}n ∼21n - Best, worst and average time
- Bound notation
- Memory
Analysis of Algorithms
最新推荐文章于 2022-10-26 13:29:53 发布