Functions in Asymptotic Notation
Explore how asymptotic notation expresses the growth rates of algorithm running times in relation to input size. Understand constant, logarithmic, polynomial, and exponential time complexities, and learn why logarithm bases are interchangeable in this context. This lesson helps clarify the order of growth to better analyze algorithm efficiency.
We'll cover the following...
When we use asymptotic notation to express the rate of growth of an algorithm's running time in terms of the input size
Let's start with something easy. Suppose that an algorithm took a constant amount of time, regardless of the input size. For example, if you were given an array that is already sorted into increasing order and you had to find the minimum element, it would take constant time, since the minimum element must be at index
Now suppose an algorithm took