liveBook · Manning

What you will learn in Algorithms Every Programmer Should Know

by Aniket Wattamwar · Manning Early Access Program (MEAP)

Chapter by chapter

Chapter 1: The Language of Algorithms

This introduction explains why algorithms matter in everyday software and why choosing one requires practical judgment, not just a search for theoretical optimality.

1.1 Setting the Scene · 1.2 Basics of Algorithms · 1.2.1 Algorithms and why do we need them? · 1.3 Analysis of Algorithms · 1.3.1 Time and Space Complexity · 1.4 Data Structures · 1.4.1 Hash Maps · 1.4.2 Linked List and Doubly Linked List · 1.4.3 Stacks and Queues · 1.4.4 Trees · 1.4.5 Graphs · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: Gale-Shapley Algorithm

The introduction frames Gale-Shapley as a way to match two equal-sized groups by preference without leaving a mutually preferred unmatched pair, and introduces deferred acceptance and proposer bias.

2.1 The Stable Matching Problem · 2.1.1 One-Pass Matching · 2.1.2 When preferences collide, rejections and rematching · 2.1.3 Understanding the bias and complexity analysis · 2.2 Real-World applications · 2.2.1 Online dating and matchmaking · 2.2.2 Ride Sharing and Delivery Matching · 2.2.3 Kolkata Paise Restaurant Problem (KPR Model) · 2.2.4 National Resident Matching Program (NRMP) · 2.3 Key Insights · 2.3.1 Everyone gets matched · 2.3.2 Stability over optimality · 2.3.3 Deferred acceptance principle · 2.3.4 Weighted and dynamic matching · 2.4 Summary

What you learn in chapter 2 →

Chapter 3: Hungarian Algorithm

Introduces the Hungarian algorithm’s assignment objective, the balanced cost matrix, and the stated complexity improvement.

3.1 Allocation problem in a nutshell · 3.2 Real-World applications · 3.3 Key Insights · 3.4 Summary · 3.5 References

What you learn in chapter 3 →

Chapter 4: Rabin–Karp Algorithm

Introduces Rabin–Karp as a hash-based way to search for a pattern in text, and explains how rolling hashes and collisions affect its performance.

4.1 String matching algorithm · 4.2 Real world applications · 4.2.1 Plagiarism Detection · 4.2.2 BioInformatics · 4.3 References · 4.4 Summary

What you learn in chapter 4 →

Chapter 5: Knuth-Morris-Pratt Algorithm

This introduction explains why naive string search wastes work on repetitive text and how KMP uses pattern information to avoid backtracking.

5.1 Fast pattern matching · 5.1.1 Building the LPS array · 5.2 Real-World applications · 5.2.1 Log analysis and real-time data streaming · 5.2.2 Intrusion Detection Systems (IDS) · 5.3 Key insights · 5.3.1 The cost of preprocessing and memory overhead · 5.3.2 Separating complexity · 5.3.3 The “No Redundancy" trap · 5.4 Summary · 5.5 References

What you learn in chapter 5 →

Chapter 6: Horspool’s Algorithm

Introduces Horspool’s right-to-left, mismatch-driven approach to string matching and explains why its precomputed shifts can speed up searches.

6.1 The paradigm shift: Right to left scanning · 6.2 Handling internal redundancy · 6.3 Real-World applications · 6.4 Key insights · 6.5 Summary · 6.6 References

What you learn in chapter 6 →

Chapter 7: Knapsack Algorithm

Introduces 0/1 Knapsack as choosing the highest-value subset under a limit, and explains why dynamic programming stores smaller solutions instead of repeating work.

7.1 Dynamic programming and the 2D matrix · 7.2 Real-World applications · 7.3 Key insights · 7.4 Summary · 7.5 References

What you learn in chapter 7 →

Chapter 8: Ant Colony Optimization Algorithm

The introduction motivates a good-enough alternative to costly exact optimization and explains how ACO adapts ants’ pheromone-guided foraging to graph search.

8.1 Optimization inspired by biology · 8.2 Real world applications · 8.3 Key insights · 8.4 Summary · 8.5 References

What you learn in chapter 8 →

Chapter 9: Floyd-Warshall Algorithm

Introduces Floyd-Warshall as a dynamic-programming approach to finding exact shortest distances between every pair of nodes in a dense graph.

9.1 All-pairs shortest path (APSP) · 9.2 Real world applications · 9.3 Key insights · 9.4 Summary · 9.5 References

What you learn in chapter 9 →

Chapter 10: Push Relabel Algorithm

Introduces maximum network flow as a capacity problem and motivates Push-Relabel’s local approach over repeated global path searches.

10.1 The mechanics of maximum network flow · 10.2 Real-world applications · 10.3 Key Insights · 10.4 Summary · 10.5 References

What you learn in chapter 10 →

Chapter 11: Bron-Kerbosch Algorithm

The introduction shifts from maximum flow to finding mutually connected groups in a graph and gives a high-level account of Bron–Kerbosch’s backtracking approach.

11.1 What is a clique? · 11.2 Real-world applications · 11.3 Key Insights · 11.4 Summary · 11.5 References

What you learn in chapter 11 →

Chapter 12: A* Algorithm

The introduction frames A* as a way to find the cheapest route to a specific destination while using an estimate of the remaining distance to guide the search.

12.1 What is an informed search algorithm? · 12.2 Real-world applications · 12.3 Key insights · 12.4 Summary · 12.5 References

What you learn in chapter 12 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.