给定权值40,30,15,5,4,3,3,构造相应的哈夫曼树及其编码.
问题描述:
给定权值40,30,15,5,4,3,3,构造相应的哈夫曼树及其编码.
答
以下是我做个的类似的题的代码:#include#include#include#include#includeusingnamespace std;typedefstruct{ //哈夫曼树的结构体char ch;int weight; //权值int parent,lchild,rc...