Skip to Content
Grokking Algorithms, Second Edition
book

Grokking Algorithms, Second Edition

by Aditya Bhargava
March 2024
Beginner to intermediate
320 pages
7h 6m
English
Manning Publications
Content preview from Grokking Algorithms, Second Edition

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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Grokking Algorithms

Grokking Algorithms

Aditya Bhargava
Algorithms: 24-part Lecture Series

Algorithms: 24-part Lecture Series

Robert Sedgewick, Kevin Wayne

Publisher Resources

ISBN: 9781633438538Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link