Big O
Big O time is the language and metric we use to describe the efficiency of the algorithms.
If your algorithm is in the form of "do this, when you're all done, do that" then you add the runtimes.
If your algorithm is in the form of "do this for each time you do that" then you multiply the runtimes.
Add the Runtimes: O(A + B) | Multipy the Runtimes: O(A * B) |
---|---|
|
Asymptotic Notations
Big-Oh
Function
f(x) = O(g(x))
Description
g(x)
is an asymptotic upper bound for f(x)
Omega
Function
f(x) = Ω(g(x))
Description
g(x)
is an asymptotic lower bound for f(x)
Theta
Function
f(x) = θ(g(x))
Description
g(x)
is an asymptotic tight bound for f(x)
Small-o
Function
f(x) = o(g(x))
Description
g(x)
is an asymptotic tight upper bound for f(x)
Small-omega
Function
f(x) = ω(g(x))
Description
g(x)
is an asymptotic tight lower bound for f(x)
Last updated