Comparing Running times

Learn how running times, expressed as functions, can be compared by examining the function growth.

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 3n+53n+5 time units, and the other has a running time of 2n+100002n+10000 time units. Is the performance of both algorithms similar, or is one better than the other?

Get hands-on with 1200+ tech skills courses.