哈夫曼树的节点结构 结点结构由:weight(权值),lchild(左孩子结点下标),rchild(右孩子结点下标),parent(双亲结点下标)。 struct ElemType { int weight; //假定权值为整数 int parent,lchild,rchild; //游标 } 哈夫曼算法代码 void HuffmanTree(ElemType huffT