Chapter 2
Considering Algorithm Design
IN THIS CHAPTER
Considering how to solve a problem
Using a divide-and-conquer approach to solving problems
Understanding the greedy approach to solving problems
Determining the costs of problem solutions
Performing algorithm measurements
As stated in Chapter 1, an algorithm consists of a series of steps used to solve a problem. In most cases, input data provides the basis of solving the problem and sometimes offers constraints that any solution must consider before anyone will see the algorithm as being effective. The first section of this chapter helps you consider the problem solution (the solution to the problem you’re trying to solve). It helps you understand the need to create algorithms that are both flexible (in that they can handle a wide range of data inputs) and effective (in that they yield the desired output).
Some problems are quite complex. In fact, you look at them at first and may decide that they’re too complicated to solve. Feeling ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access