Big-Oh and Rate of Growth
- Big-Oh notation gives an upper bound on the growth rate of a function
- "f(n) is O(g(n))" means growth rate of f(n) no more than growth rate of g(n)
- use big-Oh to rank functions according to their rate of growth
| f(n) is O(g(n)) | g(n) is O(f(n)) |
g(n) grows faster | yes | no |
f(n) grows faster | no | yes |
same order of growth | yes | yes |
|