题目内容

5 Suppose there are 4 trees in the forest T, and the number of nodes is n1, n2,n3,n4 respectively, then when the forest T is converted into a binary tree, there are ( ) nodes on the right subtree of the root node.

A. n1-1
B. n1
C. n1+n2+n3
D. n2+n3+n4

查看答案
更多问题

6 Construct a Huffman tree from 4 leaf nodes with weights of 9, 2, 5 and 7, then the weighted path length of the tree is ().

A. 23
B. 37
C. 44
D. 46

7 Let T be a Huffman tree with 8 leaf nodes, then the highest height of T can be ()

A. 4
B. 6
C. 8
D. 10

8 Which of the following is a prefix code? ( )

A. {0,1101,1110,1100,1111}
B. {0,1,01,010,110}
C. {00,01,10,11,101}
D. {01,00,10,001,110,101}

9 The postfix expression of the arithmetic expression a+b* (c+d/e) is ( ).

A. abcde/+*+
B. ab+cde/*
C. abcde/*++
D. abcde*/++

答案查题题库