题目内容

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

2. In a directed graph with n vertices, at least arcs ( ) are required to connect all vertices.

A. n
B. n-1
C. n+1
D. 2n

3. In an undirected graph, the sum of degrees of all vertices is equal to () times the number of edges.

A. 2
B. 1/2
C. 1
D. 4

答案查题题库