单选题:Which one of the following statements is TRUE about heap and Huf
Which one of the following statements is TRUE about heap and Huffman tree? @[C](2)
A. A heap must be a complete binary tree, so it is suitable to implement heap with linked list representation.
B. If we swap the left and right nonempty subtrees of any non-leaf nodes of a heap, it is still a heap.
C. There is no node with degree 1 in the Huffman tree.
D. The leaves of the Huffman tree must be in the same level.
A.A heap must be a complete binary tree, so it is suitable to implement heap with linked list representation.
B.If we swap the left and right nonempty subtrees of any non-leaf nodes of a heap, it is still a heap.
C.There is no node with degree 1 in the Huffman tree.
D.The leaves of the Huffman tree must be in the same level.
答案:C
A. A heap must be a complete binary tree, so it is suitable to implement heap with linked list representation.
B. If we swap the left and right nonempty subtrees of any non-leaf nodes of a heap, it is still a heap.
C. There is no node with degree 1 in the Huffman tree.
D. The leaves of the Huffman tree must be in the same level.
A.A heap must be a complete binary tree, so it is suitable to implement heap with linked list representation.
B.If we swap the left and right nonempty subtrees of any non-leaf nodes of a heap, it is still a heap.
C.There is no node with degree 1 in the Huffman tree.
D.The leaves of the Huffman tree must be in the same level.
答案:C