CS2
Week 5: Algorithm analysis, searching, sorting
6
Big O mathematical definition
nf(n) is actual function
associated with
algorithm execution
n
ng(n) is simplest
function such that
and f(n) <= c g(n))
nwith n> n0
n
We say f(n) is O(g(n))
i.e. such constants c and n0 exist as to make this inequality true.