Classical

Data Structures - Trees

21:   A binary tree is generated by inserting in order the following integers:
50, 15, 62, 5, 20,58, 91, 3,8,37, 60, 24
The number of nodes in the left of the root respectively is
A. (4,7)
B. (7,4)
C. (6,3)
D. (3,6)
 
 

Option: B

Explanation :


22:   Consider the following nested representation of binary trees indicates y and z are the left
right subtrees, respectively, of node x. Note that y and z may be NULL or further nested. Which of the following represents a valid binary tree ?
A. (1 2(4 5 6 7))
B. 1((2 3 NULL)4 5 6)7)
C. (1(234)(567)
D. (1(2 3 NULL)(4 5))
 
 

Option: C

Explanation :


23:   B+- trees are preferred to binary trees in databases because
A. Disk capacities are greater than memory capacities
B. Disk access is much slower than memory Access
C. Disk data transfer rates are much less than memory data transfer rates.
D. All of above
 
 

Option: B

Explanation :


24:   A full binary tree with n non-leaf nodes contains
A. log2n nodes
B. n - 1 nodes
C. 2n nodes
D. 2n + 1 nodes
 
 

Option: D

Explanation :


25:   A full binary tree with n leaves contains
A. n nodes
B. log (n+1) nodes
C. 2n - 1 nodes
D. 2n nodes
 
 

Option: C

Explanation :




Suggest an improvement