实验七 哈夫曼编码实验.docxVIP

  • 3
  • 0
  • 约2.97千字
  • 约 7页
  • 2022-10-25 发布于北京
  • 举报
树和二叉树 实验七 哈夫曼编码 哈夫曼编码 问题描述 2 n设某编码系统共有 n 个字符,使用频率分别为{w1, w , …, w },设计一个不等长的编码 2 n 基本要求 ⑴ 设计数据结构; ⑵ 设计编码算法; ⑶ 分析时间复杂度和空间复杂度。 编码#includeiostream #includestring.h using namespace std; const int Size=10,Size1=50; struct element { int weight; int lchild,rchild,parent; }; char s[Size];int w[Size],w1[Size

文档评论(0)

1亿VIP精品文档

相关文档