Week 5 Discussion Forum

What is greedy algorithm?

What is greedy algorithm?

by Mridul Halder(192-15-2908) -
Number of replies: 1

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. So the problems where choosing locally optimal also leads to global solution are best fit for Greedy.

43 words

In reply to Mridul Halder(192-15-2908)

Re: What is greedy algorithm?

by Sajia Afrin 192-15-2907 -
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