If you're talking about generating the Huffman code from the symbol frequencies (your question is not clear), then the data structure can be implicit in the storage of the tree. In fact, the calculation can be done in place, over the frequencies. See In-Place Calculation of Minimum-Redundancy Codes.
text data compression using Huffman encoding
-
30-05-2022 - |
質問
I'm starting a new project, a text data arhivator, that will use Huffman coding.
What structure is better to use in implementation of such an algorithm?
My approach is to create a simply linked list that will contain binary trees in each node. In order to build the Huffman-tree.
Is there a better way?
解決
所属していません StackOverflow