Constant | 5 |
Poly logarithmetic | (logn)5 |
Polynomial | n5 |
Exponential | 25n |
Exp | 2n5 |
Double Exp | 225n |
linear | O(n) |
Quadratic | O(n2) |
Cubic | O(n3) |
高斯求和
1 | 2 | 3 | 4 | 5 | ... | ... | n | = | n(n+1)/2 |
n | n-1 | n-2 | n-3 | n-4 | ... | ... | 1 | = |
几何求和
1 | 2 | 4 | 8 | ... | 2n | = | 2(n+1)-1 |
1 | q | q2 | q3 | ... | qn | = | (qn+1-1)/(q-1): proof: 1+q+q2+q3+...+qn = Sn q+q2+q3+...+qn+qn+1 = qSn - qn+1 - 1 = (q-1)Sn
|
Harmonic sum:
1+1/2+1/3+1/4+...+1/n