Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. A greedy
algorithm is any algorithm that follows the problem solving
metaheuristic of making the locally optimal choice at each stage with
the hope of finding the global optimum. For example, applying the greedy
strategy to the traveling salesman problem yields the following
algorithm: "At each stage visit the unvisited city nearest to the
current city".