7 Important Functions
When calculating the Big-Oh Notation of a function it is important to know the order of these functions.
# Constant function
A very simple function in the form $f(n) = c$ where c is a constant.
# The logarithm function
The logaritm function is $f(n) = log(n)$
# The linear function
The linear function is, as you might have guessed a function increasing at a set rate. They are in the form $f(n) = an +b$. This function has a higher order than the logarithmic, and the N-log(N) functions.
# The N-log(N) function
They are functions in the form $f(n) = n log(n)$. They have a higher order than logarithmic functions, but a smaller order than linear functions.
# The quadratic function
These are basically a subset of polynomial time functions and are written in the form $f(n) = an^2 + bn + c$. They have the lowest order between the polynomials, but its order is higher than all the previous functions.
# Polynomials
Polynomials are basically functions that don’t have any terms with a factor less than 0. A polynomial’s degree is the term with the highest power in it. The higher a polynomial’s degree is, the higher its order in the big-Oh notation.
# The exponential function
These little fuckers are the worst of all, they are very slow, can be represented using formulas in the form $f(n) = a^n$ where $a \in \mathbb{Q}$. They have the highest order between all the functions, and the order increases as a increases.