Chapter 15

Working with Greedy Algorithms

IN THIS CHAPTER

check Understanding how to design new algorithms and use solving paradigms

check Explaining how an algorithm can act greedy and get great results

check Drafting a greedy algorithm of your own

check Revisiting Huffman coding and illustrating some other classical examples

After taking your first steps into the world of algorithms by presenting what algorithms are and discussing ordering, searching, graphs, and big data, it’s time to enter a more general part of the book. In this latter part of the book, you deal with some difficult examples and see general algorithmic approaches that you can use under different circumstances when solving real-world problems.

By taking new routes and approaches, this chapter goes well beyond the divide-and-conquer recursion approach that dominates in most sorting problems. Some of the discussed solutions aren’t completely new; you’ve seen them in previous chapters. However, this chapter discusses those previous algorithms in greater depth, under the new paradigms (a consideration of application rules and conditions, ...

Get Algorithms For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.