我对霍夫曼代码有疑问 [英] i have a quastion about huffman code

查看:58
本文介绍了我对霍夫曼代码有疑问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写霍夫曼代码,我想到的算法在这里:
1.问一个句子
2.计算字符
3.计算每个字符的重复时间
4.除(每个字符重复的时间)和所有字符的数目

所以正确与否?
而且我不知道该怎么办?

i want to write Huffman code and the algorithm that i think about it is here :
1.ask a sentence
2.count the characters
3.count the time of the repeat of each characters
4. divide (time of the repeat of each characters) and the numbers of all characters

so for it is correct or not?
and i don''t know what to do ?

推荐答案

请参见

这篇关于我对霍夫曼代码有疑问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆