首页 > 用户发贴区 > 编程问题提问区 > 构造哈夫曼树及字符的编码
2008
12-28

构造哈夫曼树及字符的编码

有一电文见tel.txt,请为出现的不同字符(不区分字母的大小写,标点符号不计,空格不计)构造哈夫曼树及字符的编码。用程序实现之并输出相应的哈夫曼树及哈夫曼编码。
要求:1、哈夫曼树中的结点元素值左小右大;2、编码左0右1

tel.txt
No Magic is pleased to announce the beta releases of MagicDraw, SysML plugin and DoDAF plugin version 16.0 beta 2. MagicDraw 16.0 release is focused on the latest UML 2.2 specification including improvements in support and usability, model merge, DSL, code engineering, Report Wizard, Teamwork server and SVN communication. This new release uses MDA/MDD to enable generation of code for Oracle databases. In addition, model merge now adds capability to visually merge diagram changes. Diagramming improvements now enable conversion of diagrams to other types of compatible diagrams.


留下一个回复