hulf
代码说明:
说明: 设计一个哈夫曼编码器 要求对一段数据序列进行哈夫曼编码,使得平均码长最短,输出各元素编码和编码后的数据序列。 ① 组成序列的元素是[0-9]这10个数字,每个数字其对应的4位二进制数表示。比如5对应0101,9对应1001。 ② 输入数据序列的长度为256。 ③ 先输出每个元素的编码,然后输出数据序列对应的哈夫曼编码序列。(Designing a Huffman Encoder Huffman coding is required for a data sequence to minimize the average code length and output the coded and coded data sequence of each element. (1) The elements that make up the sequence are the 10 digits [0-9], and each digit is represented by its corresponding 4-bit binary number. For example, 5 corresponds to 0101, 9 corresponds to 1001. (2) The length of the input data sequence is 256. (3) First output the encoding of each element, and then output the Huffman encoding sequence corresponding to the data sequence.)
下载说明:请别用迅雷下载,失败请重下,重下不扣分!


