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