answersLogoWhite

0

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.

User Avatar

Wiki User

10y ago

Still curious? Ask our experts.

Chat with our AI personalities

JudyJudy
Simplicity is my specialty.
Chat with Judy
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
BeauBeau
You're doing better than you think!
Chat with Beau

Add your answer:

Earn +20 pts
Q: How does the Greedy Algorithm work?
Write your answer...
Submit
Still have questions?
magnify glass
imp