There is not "a" greedy algorithm; "greedy algorithm" is a term to describe several algorithms that have some things in common. The general idea is that at each step, you look for what seems to be, "locally", the best solution. For example, in a shortest-distance problem, look for a step that takes you closer to the destination. This may, or may not, lead to the best solution overall.
Chat with our AI personalities
Many of them.
45
Greedy has two syllables.
In Sanskrit, 'prameya' is the word for algorithm.
An algorithm for constructing the convex hull