30 Assume that F is a forest, made up of tree T1, T2, T3, and the node numbers of T1, T2, T3 are n1, n2, n3 respectively. If the binary tree corresponding to F is B, there are ( ) nodes in the left subtree of B.
A. n2-1
B. n3-1
C. n1-1
D. n2
查看答案
31 Transform a tree T into a binary tree B, Then the post-order traversal sequence of T is the same as the ( ) sequence of B.
A. preorder traversal
B. postorder traversal
C. inorder traversal
D. level traversal
32 If a complete 3-ary tree is stored sequentially in a one-dimensional array(subscript starts from 0). Then which level is the node with subscript 121 at?
A. 4
B. 5
C. 6
D. 7
33 If a complete 3-ary tree is stored sequentially in a one-dimensional array(subscript starts from 0). Then which level is the node with subscript 120 at?
A. 4
B. 5
C. 6
D. 8
34 For the following equivalence class, please use "weighted union rule" and UNION/FIND algorithm to write down the final parent node index sequence. 4-0 6-2 8-4 9-4 3-5 9-5 5-2 1-2 7-1 Notice: When we join two trees with the same size, we let the root of the second tree point to the root of the first tree. The index of the root node is itself.
A. 4 4 6 4 4 3 4 4 4 4
B. 4 7 6 8 8 3 1 7 8 8
C. 9 2 2 5 0 2 2 2 0 5
D. 4 4 4 4 6 4 3 4 4 4