What Are Greedy Algorithms Used For?

Technology CommunityCategory: Greedy AlgorithmsWhat Are Greedy Algorithms Used For?
VietMX Staff asked 3 years ago

Greedy algorithms are quick. A lot faster than the two other alternatives (Divide & Conquer, and Dynamic Programming). They’re used because they’re fast. Sometimes, Greedy algorithms give the global optimal solution every time. Some of these algorithms are:

  • Dijkstra’s Algorithm
  • Kruskal’s algorithm
  • Prim’s algorithm
  • Huffman trees

These algorithms are Greedy, and their Greedy solution gives the optimal solution.