
CS2
Week 5: Algorithm
analysis, searching,
sorting
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
i.e. such constants c and n0 exist as to make this inequality true.