+ 1

What is "Greedy Algorithms" ?

What is "Greedy Algorithms" ? and how to draw Huffman Coding tree ?

12th May 2018, 2:42 AM
Mutahher Mahmood
Mutahher Mahmood - avatar
2 Answers
+ 4
*What is a 'Greedy algorithm'?* "... A greedy algorithm, as the name suggests, always makes the choice that seems to be the best at that moment. This means that it makes a locally-optimal choice in the hope that this choice will lead to a globally-optimal solution. ..." Source: https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/tutorial/ "Greedy Algorithms: articles and problems" https://www.geeksforgeeks.org/greedy-algorithms/ " A quick tutorial on generating a huffman tree" https://www.siggraph.org/education/materials/HyperGraph/video/mpeg/mpegfaq/huffman_tutorial.html " ... Steps to build Huffman Tree ... " https://www.geeksforgeeks.org/greedy-algorithms-set-3-huffman-coding/
12th May 2018, 3:38 AM
Rahul George
Rahul George - avatar
+ 1
To illustrate what Rahul George perfectly says: Imagine trying to pack as much volume of suitcases you can in the trunk of your car. Greedy algorithm is putting the biggest cases first. Not optimal but simple and usually better than random.
12th May 2018, 5:51 AM
VcC
VcC - avatar