Linear
O(n)
- performance declines as data set grows
- execution time is directly proportional to the input size
Logarithmic
O(log n)
- halves data set in each pass
Constant
O(1)
- always executes in same amount of time regardless of data set size
Logarithmic example
Polynomial
O(n2)
- performance is proportional to the square of the size of the data set
- significantly reduces efficiency with increasingly large data sets
Polynomial example(s)
merge sort
insertion sort
bubble sort
quick sort
space
best time