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

Appendix B. NP-hard problems

Both the set-covering and traveling salesperson problems have something in common: they are hard to solve. You have to check every possible iteration to find the smallest set cover or the shortest route.

Both of these problems are NP-hard. The terms NP, NP-hard, and NP-complete can cause a lot of confusion. They certainly confused me. In this appendix, I’ll try to explain what all these terms mean, but I need to explain some other concepts first. Here is a roadmap of the things we will learn and how they depend on each other:

But, first, I need to explain what a decision problem is because all the problems we will ...

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