题目内容

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

1. An undirected graph with n vertices has at most () edges.

A. n(n-1)/2
B. n(n-1)
C. n
D. 2n

答案查题题库