Comparing Running times
Learn how running times, expressed as functions, can be compared by examining the function growth.
We'll cover the following...
Alice and Bob are trying to solve the same problem, and they both come up with different algorithms for it.
They are able to express their running times as two functions. But can they compare the two functions and see if one is better than the other?
One has a running time of time units, and the other has a running time of time units. Is the performance of both algorithms similar, or is one better than the other?
To be able to make this kind of assessment, we need to compare the two polynomials and look at how the functions grow.
Comparing how different functions grow
Let’s look at how some functions grow as the value of grows larger.