Question: why huffman coding is greedy?
Answer: Huffman codes are greedy in the sense that the least frequent codes are given the longest paths in the tree. Greedy choice property: if x and y have the two lowest counts, then the optimal algorithm will have them at the same path length, i.e. their codes are two of the longest.