O'Reilly logo

How to Think About Algorithms by Jeff Edmonds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

23 Time Complexity

It is important to classify algorithms based whether they solve a given computational problem and, if so, how quickly. Similarly, it is important to classify computational problems based whether they can be solved and, if so, how quickly.

image

23.1 The Time (and Space) Complexity of an Algorithm Purpose:

        Estimate Duration: To estimate how long an algorithm or program will run.

        Estimate Input Size: To estimate the largest input that can reasonably be given to the program.

        Compare Algorithms: To compare the efficiency of different algorithms for solving the same problem.

        Parts of Code: To help you focus ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required