Chapter 2

Considering Algorithm Design


check Considering how to solve a problem

check Using a divide-and-conquer approach to solving problems

check Understanding the greedy approach to solving problems

check Determining the costs of problem solutions

check 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 ...

Get Algorithms For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.