摘要: 问题:事情总是这样,当你明白时,很简单,但当你不会时,又好像觉得自己怎么那么笨。。。huffman算法关键是选择两个最小的数时不要弄错了。刚开始看时,真的很吃力,都不敢相信自己居然把huffman译码也做出来了。代码:#include <iostream>#include <cstdlib>#include <cstring>using namespace std;int s1,s2;typedef struct huffmanNode{ int weight; int parent; int lchild; int rchild;}*HuffmanTree 阅读全文
posted @ 2013-05-01 17:01 xshang 阅读(806) 评论(2) 推荐(1) 编辑