Time Complexity
Big O-notation is the use of the function \(O\) to decscibe the behavior of steps a function will take as input grows
Constant
\(O(1)\)
Linear
\(O(n)\)
Logarithmic
\(O(\log n)\)
Binary Search
To find the amount of steps required for the worst case can be described with this equation
\(\log_2 n\), where n
is the number of elements in a sorted list
Quadratic
\(O(n^2)\)
Exponential
\(O(2^n)\)