Very often, software developers need to evaluate the trade-offs between different approaches to solving a problem. Do you want the fastest solution, even if it’s difficult to implement and maintain? Will your code still be useful if you have to process 100 times as much data? What if an algorithm is fast for some inputs but terrible for others? Algorithm analysis is the framework that computer scientists use to understand the trade-offs between algorithms. Algorithm analysis is primarily theoretical: It focuses on the fundamental properties of algorithms, and not on systems, languages, or any particular details of their implementations.
This chapter introduces the key concepts of algorithm analysis, starting from the practical example of searching an array for a value of interest. We’ll start by making experimental comparisons between two searching methods: a simple linear search and the more complex binary search. The second part of the chapter introduces one of the most important mathematical tools in computer science, Big-O notation, the primary tool for algorithm analysis.
Review the options below to login to check your access.
Log in with your Cambridge Aspire website account to check access.
If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.