Introduction to Algorithm Design Techniques

Over the last half a century, computer scientists have discovered that many algorithms share similar ideas, even though they solve very different problems. For now, we’ll mention the most common algorithm design techniques so that future examples can be categorized in terms of the algorithm’s design methodology.

To illustrate the design techniques, we’ll consider a very simple problem that plagued nearly everyone before the era of mobile phones, when people used cordless phones. Suppose your cordless phone rings, but you’ve misplaced the handset somewhere in your home. How do you find it? To complicate matters, you’ve just walked into your home with an armful of groceries, and it’s dark out, so you cannot rely solely on eyesight.

Exhaustive search algorithms

In an exhaustive search, or brute force, the algorithm examines every possible alternative to find one particular solution.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.