10 Greedy algorithms
In this chapter
- You learn about the greedy strategy, a very simple problem-solving strategy.
- You learn how to cope with the impossible: problems that have no fast algorithmic solution (NP-hard problems).
- You learn about approximation algorithms, which you can use to find an approximate solution to an NP-hard problem quickly.
- You learn about the greedy strategy, a very simple problem-solving strategy.
The classroom scheduling problem
Suppose you have a classroom and want to hold as many classes here as possible. You get a list of classes.
You can’t hold all of these classes in there because some of them overlap.