[prev] 29 [next]

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 fasteryesno
f(n) grows fasternoyes
same order of growthyesyes