题目内容

22 In the Huffman tree, if the encoding length is only allowed to be less than or equal to 4, in addition to the determined encodings of two characters as 0 and 10, at most ( ) characters can be encoded.

A. 4
B. 3
C. 5
D. 6

查看答案
更多问题

23 In the preorder, inorder and postorder sequences of the binary tree, the order of all leaf nodes is( ).

A. Not the same
B. Exactly the same
C. the same in preorder and inorder sequence, but different from that in postorder sequence
D. the same in inorder and postorder sequence, but different from that in perorder sequence
E. the same in inorder and postorder sequence, but different from that in perorder sequence

24 Given a binary tree, the postorder traversal sequence is EDBCA, and the inorder traversal sequence is BEDAC, then the preorder traversal sequence is ( ).

A. BAEDC
B. AEBDC
C. ABDEC
D. AEDBC

25 If there are only nodes with degree 0 and 2 in the binary tree, and if there are X nodes with degree 0,then the number of nodes in the binary tree is ( ).

A. 2X
B. 2X-1
C. 2X+1
D. Insufficient conditions to calculate

26 A full k-ary tree with depth h has at most ( ) leaf nodes.

A. k^(h-1)
B. k^h
C. (k^(h-1)-1)/(k-1)
D. (k^h-1)/(k-1)

答案查题题库