Skip to content

Instantly share code, notes, and snippets.

@WarpEngineer
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save WarpEngineer/77819d2bdc8876bd5de4 to your computer and use it in GitHub Desktop.

Select an option

Save WarpEngineer/77819d2bdc8876bd5de4 to your computer and use it in GitHub Desktop.
Table of Important Big-Oh Sets
Arranged from smallest to largest, happiest to saddest, in order of increasing domination:
function common name
-------- -----------
O( 1 ) :: constant
is a subset of O( log n ) :: logarithmic
is a subset of O( log^2 n ) :: log-squared [that's (log n)^2 ]
is a subset of O( root(n) ) :: root-n [that's the square root]
is a subset of O( n ) :: linear
is a subset of O( n log n ) :: n log n
is a subset of O( n^2 ) :: quadratic
is a subset of O( n^3 ) :: cubic
is a subset of O( n^4 ) :: quartic
is a subset of O( 2^n ) :: exponential
is a subset of O( e^n ) :: exponential (but more so)
is a subset of O( n! ) :: factorial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment