Latest: Capgemini data structures mcqs questions and answers

Question 1 :

Consider a binary tree consisting of 10 nodes from A to J. It is given that the tree has exactly one leaf node and the level order transversal of the tree is A,B,C,D,E,F,G,H,I,J. Which of the following will be the leaf node ?

Options : 

a. B

b. H

c. I

d. J

Answers : 

d. J

 

Question 2 :

Consider a non-trivial tree, T. Which of the following can be the number of node(s) in T ?

Options : 

a. 2

b. 1

c. 3

d. Cannot be determined

Answers : 

a. 2

 

Question 3 :

Consider a 3-ary tree, T whose array representation is P,Q,R,S,T,U. What is the minimum number of nodes that should be added in 3-ary tree ?

Options : 

a. 8

b. 6 

c. 9

d. 7

Answers : 

b. 6 

 

Question 4 :

Which of the following data structure can be used ideally to maintain the previous states, while recursion calls itself again and again ?

Options : 

a. Queue

b. Heap 

c. Tree

d. Stack

Answers : 

d. Stack

 

Question 5 :

What is the degeneracy of a graph used to measure/find?

Options : 

a. To detect a cycle in the graph 

b. To check if there are self loops in the graph

c. Sparsity of the graph 

d. To check if there are parallel edges in the graph 

Answers : 

c. Sparsity of the graph 

 

Question 6 :

  1. Array
  2. Linked List
  3. Stack

In which of the above data structure(s) can insertion be done from one end only ?

Options : 

a. Only 3

b. Only 1

c. 1 and 3

d. Only 2

Answers : 

a. Only 3

 

This Post Has 3 Comments

Leave a Reply