Time Complexity O(1) O(log n) O(n) O(n log n) O(n2) O(n3) O(2n) O (n!) Name Constant Logarithmic Linear Linear Logarithm Quadratic Cubic Exponential Factorial Example Adding an element to the front of a linked list Finding an element in a sorted array Finding an element in an unsorted array Sorting n items by divide-&-conquer merge sort Shortest path between two nodes in a graph Matrix Multiplication The Towers of Hanoi problem
* There are many other orders that are far worse than even these.