Every big-O notation with example codes and a list ordered from the quickest (top) to the slowest (bottom) time complexities:
- Constant Time - O(1)
- Logarithmic Time - O(log n)
- Linear Time - O(n)
- Linearithmic Time - O(n log n)
- Square Root Time - O(sqrt(n))
- Quadratic Time - O(n^2)
- Cubic Time - O(n^3)
- Exponential Time - O(2^n)
- Exponential Time with a Constant Factor - O(c^n)
- Factorial Time - O(n!)