O'Reilly logo

Grokking Algorithms: An illustrated guide for programmers and other curious people by Aditya Y. Bhargava

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Greedy algorithms

In this chapter

  • You learn how to tackle the impossible: problems that have no fast algorithmic solution (NP-complete problems).
  • You learn how to identify such problems when you see them, so you don’t waste time trying to find a fast algorithm for them.
  • You learn about approximation algorithms, which you can use to find an approximate solution to an NP-complete problem quickly.
  • You learn about the greedy strategy, a very simple problem-solving strategy.

The classroom scheduling problem

Suppose you have a classroom ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required