Chapter 2

Considering Algorithm Design

IN THIS CHAPTER

Bullet Considering how to solve a problem

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

Bullet Understanding the greedy approach to solving problems

Bullet Determining the costs of problem solutions

Bullet Performing algorithm measurements

An algorithm consists of a series of steps used to solve a problem, that could include input data to provide the basis of solving the problem and sometimes constraints that any solution must consider before anyone will regard the algorithm as 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 (can handle a wide range of data inputs) and effective (yield the desired output).

The second section of this chapter considers how to derive a solution. Feeling overwhelmed by a problem is common and the most common way to solve the issue is to divide the problem ...

Get Algorithms For Dummies, 2nd Edition 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.