Introduction - If you have any usage issues, please Google them yourself
HuffmanNode* CreateHuffmanTree(int n, char datas[], int powers[])
{
HuffmanNode head
head.next = NULL //初始化森林
for (int i = 0 i < n i++)
{
HuffmanNode*pNode = new HuffmanNode
pNode->data = datas[i]
pNode->power = powers[i]
pNode->lchild = pNode->rchild = pNode->next = NULL
AddNode(&head, pNode)
}