Working with Greedy Algorithms
IN THIS CHAPTER
Understanding how to design new algorithms and use solving paradigms
Explaining how an algorithm can act greedy and get great results
Drafting a greedy algorithm of your own
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, ...