Time complexity of algorithms
O(1)
- constant time
O(log(n))
- logarithmic time (binary search)
O(n)
- linear time (search min element in unordered list)
O(n * log(n))
- quick sort
O(n**2)
- n-sqaured (bubble sort)
O(2**n)
- exponential time (recursive problems)
O(n!)
- factorial time (traveling salesman problem via brute-force search)
Computational Complexity
Complexity theory: P vs NP
Computational Complexity MIT lecture