Non-testable
This article is not testable material.
A greedy algorithm is a type of algorithm that uses heuristics to make a locally optimal choice that will approximate a globally optimal one.
Examples
An example is in the traveling salesman problem, always visit the nearest local unvisited city. This will usually not result in the most optimal result, but will terminate in a very small amount of operations and will usually not be the worst result.
Examples of greedy algorithms include Kruskal’s and Dijkstra’s.