Week 5 Discussion Forum

What is greedy algorithm?

Re: What is greedy algorithm?

by Sajia Afrin 192-15-2907 -
Number of replies: 0
A greedy algorithm is a simple, intuitive algorithm that is used in optimization problems. The algorithm makes the optimal choice at each step as it attempts to find the overall optimal way to solve the entire problem. Greedy algorithms are quite successful in some problems, such as Huffman encoding which is used to compress data, or Dijkstra's algorithm, which is used to find the shortest path through a graph.

69 words