+ 1
What is "Greedy Algorithms" ?
What is "Greedy Algorithms" ? and how to draw Huffman Coding tree ?
2 ответов
+ 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/
+ 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.