###Python Algorithms
Complexity | Name | Examples |
---|---|---|
Θ(1) | Constant | Hash table lookup and modification(dict). |
Θ(lg n) | Logarithmic | Binary search. |
Θ(n) | Linear | Iterating over a list. |
Θ(nlg n) | Loglinear | Optimal sorting of arbitrary values. |
Θ(n**2) | Quadratic | Comparing n objects to each other. |
Θ(n**3) | Cubic | Floyd and Warshall’s algorithms. |
O(n**k) | Polynomial | k nested for loops over n. |
Ω(k**n) | Exponential | Producing every subset of n items. |
Θ(n!) | Factorial | Producing every ordering of n values. |