对于给定的一组权W={1,4,9,16,25,36,49,64,81,100},构造一棵具有最小带权外部路径长度的三叉树,
A. 10,6,18,8,4,2,12,20,16,30,28
B. 1,12,10,20,6,18,4,16,30,8,28
C. 2,4,6,8,10,12,16,18,20,28,30
D. 30,10,20,12,2,4,16,6,8,28,18
A、对应与一组权值构造出的Huffman树一般不是唯一的
B、Huffman树具有最小权值路径长度
C、Huffman树中没有度为1的结点
D、Huffman树中除了度为1的结点外,还有度为2的结点和叶结点
对于如下图所示的最大堆,删除掉最大的元素后,堆的前序遍历结果是 For the following maximum heap, after deleting the maximum element, the preorder traversal sequence is 请依次写出插入到树中的元素,每两个元素之间用一个空格隔开。 Please write down the elements successively, and there is one blank space between two elements.
下表展示了在一段文本中每个字母出现的次数。 The frequencies that each letter appears in a paragraph is represented as follow.对于这段文本使用Huffman编码相较使用等长编码能够节约多少比特的空间?Comparing to use codes that have the same length, how many bits of space could be saved when we use Huffman code for the paragraph?
A、n2
B、n3
C、n1+n3
D、n2+n3
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!