Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Data Structures - MCQ with answers

Data Structures - MCQ with answers - Computer Science Engineering (CSE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


DC08                                                                                                                   DATA STRUCTURES 
 
 
1
 
TYPICAL QUESTIONS & ANSWERS 
 
PART I 
OBJECTIVE TYPE QUESTIONS 
 
Each Question carries 2 marks. 
 
Q.1  If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the 
expected number of collisions involving a particular key x is :   
    (A)  less than 1. (B)  less than n. 
   (C)  less than m. (D)  less than n/2. 
   
            Ans:A 
Q.2  Let A be an adjacency matrix of a graph G.  The 
th
ij entry in the matrix 
K
A , gives 
    (A)  The number of paths of length K from vertex Vi to vertex Vj. 
   (B)  Shortest path of K edges from vertex Vi to vertex Vj. 
(C) Length of a Eulerian path from vertex Vi to vertex Vj.  
(D) Length of a Hamiltonian cycle from vertex Vi to vertex Vj. 
 
  Ans:B 
 
Q.3  The OS of a computer may periodically collect all the free memory space to form contiguous 
block of free space.  This is called  
   (A)  Concatenation  (B)  Garbage collection 
        (C)  Collision  (D)  Dynamic Memory Allocation 
 
  Ans:B 
 
Q.4  What is the following code segment doing? 
                           void fn( ){ 
                                           char c; 
                           cin.get(c);    
                                            if (c != ‘\n’) {  
                                         fn( ); 
                                         cout.put(c); 
                                                          } 
                                              }      
(A) The string entered is printed as it is.  
(B) The string entered is printed in reverse order. 
(C) It will go in an infinite loop.  
(D) It will print an empty line. 
 
  Ans:B 
 
 
 
Page 2


DC08                                                                                                                   DATA STRUCTURES 
 
 
1
 
TYPICAL QUESTIONS & ANSWERS 
 
PART I 
OBJECTIVE TYPE QUESTIONS 
 
Each Question carries 2 marks. 
 
Q.1  If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the 
expected number of collisions involving a particular key x is :   
    (A)  less than 1. (B)  less than n. 
   (C)  less than m. (D)  less than n/2. 
   
            Ans:A 
Q.2  Let A be an adjacency matrix of a graph G.  The 
th
ij entry in the matrix 
K
A , gives 
    (A)  The number of paths of length K from vertex Vi to vertex Vj. 
   (B)  Shortest path of K edges from vertex Vi to vertex Vj. 
(C) Length of a Eulerian path from vertex Vi to vertex Vj.  
(D) Length of a Hamiltonian cycle from vertex Vi to vertex Vj. 
 
  Ans:B 
 
Q.3  The OS of a computer may periodically collect all the free memory space to form contiguous 
block of free space.  This is called  
   (A)  Concatenation  (B)  Garbage collection 
        (C)  Collision  (D)  Dynamic Memory Allocation 
 
  Ans:B 
 
Q.4  What is the following code segment doing? 
                           void fn( ){ 
                                           char c; 
                           cin.get(c);    
                                            if (c != ‘\n’) {  
                                         fn( ); 
                                         cout.put(c); 
                                                          } 
                                              }      
(A) The string entered is printed as it is.  
(B) The string entered is printed in reverse order. 
(C) It will go in an infinite loop.  
(D) It will print an empty line. 
 
  Ans:B 
 
 
 
DC08                                                                                                                   DATA STRUCTURES 
 
 
2
Q.5 You have to sort a list L consisting of a sorted list followed by a few “random” elements.  
Which of the following sorting methods would be especially suitable for such a task?  
(A) Bubble sort (B)  Selection sort 
(C)  Quick sort (D)  Insertion sort  
  
  Ans:D 
 
Q.6  B Trees are generally 
(A) very deep and narrow (B)  very wide and shallow 
   (C)  very deep and very wide (D)  cannot say 
  
  Ans:D 
 
Q.7  A technique for direct search is   
   (A)  Binary Search (B)  Linear Search 
   (C)  Tree Search (D) Hashing 
   
  Ans:D   
   
Q.8  If a node having two children is deleted from a binary tree, it is replaced by its 
   (A)  Inorder predecessor (B)  Inorder successor 
   (C)  Preorder predecessor (D)  None of the above 
  
Ans:B 
 
Q.9  The searching technique that takes O (1) time to find a data is   
    (A)  Linear Search (B)  Binary Search 
(C)   Hashing  (D)  Tree Search 
  
  Ans:C 
 
Q.10  A mathematical-model with a collection of operations defined on that model is called  
(A) Data Structure (B)  Abstract Data Type 
(C)  Primitive Data Type (D)  Algorithm 
       
  Ans:B 
 
Q.11      The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort  
is                      
 (A) 6                                              (B)  5 
 (C) 7   (D)  8 
       
   Ans:B 
 
Q.12 The postfix form of the expression ( ) ( ) G / F E D C B A * - * * + is    
(A)   * * - * + / FG E CD AB (B)  / G F E CD AB * * - * + 
(C)  / G F E CD AB * * - * + (D)  / G F CDE AB * * - * +  
         
Page 3


DC08                                                                                                                   DATA STRUCTURES 
 
 
1
 
TYPICAL QUESTIONS & ANSWERS 
 
PART I 
OBJECTIVE TYPE QUESTIONS 
 
Each Question carries 2 marks. 
 
Q.1  If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the 
expected number of collisions involving a particular key x is :   
    (A)  less than 1. (B)  less than n. 
   (C)  less than m. (D)  less than n/2. 
   
            Ans:A 
Q.2  Let A be an adjacency matrix of a graph G.  The 
th
ij entry in the matrix 
K
A , gives 
    (A)  The number of paths of length K from vertex Vi to vertex Vj. 
   (B)  Shortest path of K edges from vertex Vi to vertex Vj. 
(C) Length of a Eulerian path from vertex Vi to vertex Vj.  
(D) Length of a Hamiltonian cycle from vertex Vi to vertex Vj. 
 
  Ans:B 
 
Q.3  The OS of a computer may periodically collect all the free memory space to form contiguous 
block of free space.  This is called  
   (A)  Concatenation  (B)  Garbage collection 
        (C)  Collision  (D)  Dynamic Memory Allocation 
 
  Ans:B 
 
Q.4  What is the following code segment doing? 
                           void fn( ){ 
                                           char c; 
                           cin.get(c);    
                                            if (c != ‘\n’) {  
                                         fn( ); 
                                         cout.put(c); 
                                                          } 
                                              }      
(A) The string entered is printed as it is.  
(B) The string entered is printed in reverse order. 
(C) It will go in an infinite loop.  
(D) It will print an empty line. 
 
  Ans:B 
 
 
 
DC08                                                                                                                   DATA STRUCTURES 
 
 
2
Q.5 You have to sort a list L consisting of a sorted list followed by a few “random” elements.  
Which of the following sorting methods would be especially suitable for such a task?  
(A) Bubble sort (B)  Selection sort 
(C)  Quick sort (D)  Insertion sort  
  
  Ans:D 
 
Q.6  B Trees are generally 
(A) very deep and narrow (B)  very wide and shallow 
   (C)  very deep and very wide (D)  cannot say 
  
  Ans:D 
 
Q.7  A technique for direct search is   
   (A)  Binary Search (B)  Linear Search 
   (C)  Tree Search (D) Hashing 
   
  Ans:D   
   
Q.8  If a node having two children is deleted from a binary tree, it is replaced by its 
   (A)  Inorder predecessor (B)  Inorder successor 
   (C)  Preorder predecessor (D)  None of the above 
  
Ans:B 
 
Q.9  The searching technique that takes O (1) time to find a data is   
    (A)  Linear Search (B)  Binary Search 
(C)   Hashing  (D)  Tree Search 
  
  Ans:C 
 
Q.10  A mathematical-model with a collection of operations defined on that model is called  
(A) Data Structure (B)  Abstract Data Type 
(C)  Primitive Data Type (D)  Algorithm 
       
  Ans:B 
 
Q.11      The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort  
is                      
 (A) 6                                              (B)  5 
 (C) 7   (D)  8 
       
   Ans:B 
 
Q.12 The postfix form of the expression ( ) ( ) G / F E D C B A * - * * + is    
(A)   * * - * + / FG E CD AB (B)  / G F E CD AB * * - * + 
(C)  / G F E CD AB * * - * + (D)  / G F CDE AB * * - * +  
         
DC08                                                                                                                   DATA STRUCTURES 
 
 
3
  Ans: A 
 
Q.13 The complexity of multiplying two matrices of order m*n and n*p is    
(A)  mnp (B)  mp 
(C)  mn         (D)  np 
   
  Ans:A 
 
Q.14 Merging 4 sorted files containing 50, 10, 25 and 15 records will take____time 
(A)  O (100) (B) O (200) 
(C)  O (175) (D) O (125) 
   
  Ans:A 
 
Q.15  For an undirected graph with n vertices and e edges, the sum of the degree of each vertex is 
equal to 
(A) 2n (B)  (2n-1)/2 
(C) 2e (D)  e
2
/2 
   
  Ans:C 
 
Q.16 In worst case Quick Sort has order  
(A) O (n log n) (B)  O (n
2
/2) 
(C) O (log n) (D)  O (n
2
/4) 
  
   Ans:B 
 
Q.17 A full binary tree with 2n+1 nodes contain 
(A) n leaf nodes (B)  n non-leaf nodes 
(C) n-1 leaf nodes (D)  n-1 non-leaf nodes 
   
  Ans:B 
 
Q.18 If a node in a BST has two children, then its inorder predecessor has 
(A) no left child (B)  no right child 
(C) two children  (D)  no child  
 
  Ans:B 
 
Q.19  A binary tree in which if all its levels except possibly the last, have the maximum number of 
nodes and all the nodes at the last level appear as far left as possible, is known as    
           (A)  full binary tree.                            (B)  AVL tree. 
                 (C)  threaded tree. (D)  complete binary tree. 
  
  Ans:A 
 
 Q.20  A linear list of elements in which deletion can be done from one end (front) and insertion 
can take place only at the other end (rear) is known as a   
(A)  queue. (B)  stack. 
Page 4


DC08                                                                                                                   DATA STRUCTURES 
 
 
1
 
TYPICAL QUESTIONS & ANSWERS 
 
PART I 
OBJECTIVE TYPE QUESTIONS 
 
Each Question carries 2 marks. 
 
Q.1  If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the 
expected number of collisions involving a particular key x is :   
    (A)  less than 1. (B)  less than n. 
   (C)  less than m. (D)  less than n/2. 
   
            Ans:A 
Q.2  Let A be an adjacency matrix of a graph G.  The 
th
ij entry in the matrix 
K
A , gives 
    (A)  The number of paths of length K from vertex Vi to vertex Vj. 
   (B)  Shortest path of K edges from vertex Vi to vertex Vj. 
(C) Length of a Eulerian path from vertex Vi to vertex Vj.  
(D) Length of a Hamiltonian cycle from vertex Vi to vertex Vj. 
 
  Ans:B 
 
Q.3  The OS of a computer may periodically collect all the free memory space to form contiguous 
block of free space.  This is called  
   (A)  Concatenation  (B)  Garbage collection 
        (C)  Collision  (D)  Dynamic Memory Allocation 
 
  Ans:B 
 
Q.4  What is the following code segment doing? 
                           void fn( ){ 
                                           char c; 
                           cin.get(c);    
                                            if (c != ‘\n’) {  
                                         fn( ); 
                                         cout.put(c); 
                                                          } 
                                              }      
(A) The string entered is printed as it is.  
(B) The string entered is printed in reverse order. 
(C) It will go in an infinite loop.  
(D) It will print an empty line. 
 
  Ans:B 
 
 
 
DC08                                                                                                                   DATA STRUCTURES 
 
 
2
Q.5 You have to sort a list L consisting of a sorted list followed by a few “random” elements.  
Which of the following sorting methods would be especially suitable for such a task?  
(A) Bubble sort (B)  Selection sort 
(C)  Quick sort (D)  Insertion sort  
  
  Ans:D 
 
Q.6  B Trees are generally 
(A) very deep and narrow (B)  very wide and shallow 
   (C)  very deep and very wide (D)  cannot say 
  
  Ans:D 
 
Q.7  A technique for direct search is   
   (A)  Binary Search (B)  Linear Search 
   (C)  Tree Search (D) Hashing 
   
  Ans:D   
   
Q.8  If a node having two children is deleted from a binary tree, it is replaced by its 
   (A)  Inorder predecessor (B)  Inorder successor 
   (C)  Preorder predecessor (D)  None of the above 
  
Ans:B 
 
Q.9  The searching technique that takes O (1) time to find a data is   
    (A)  Linear Search (B)  Binary Search 
(C)   Hashing  (D)  Tree Search 
  
  Ans:C 
 
Q.10  A mathematical-model with a collection of operations defined on that model is called  
(A) Data Structure (B)  Abstract Data Type 
(C)  Primitive Data Type (D)  Algorithm 
       
  Ans:B 
 
Q.11      The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort  
is                      
 (A) 6                                              (B)  5 
 (C) 7   (D)  8 
       
   Ans:B 
 
Q.12 The postfix form of the expression ( ) ( ) G / F E D C B A * - * * + is    
(A)   * * - * + / FG E CD AB (B)  / G F E CD AB * * - * + 
(C)  / G F E CD AB * * - * + (D)  / G F CDE AB * * - * +  
         
DC08                                                                                                                   DATA STRUCTURES 
 
 
3
  Ans: A 
 
Q.13 The complexity of multiplying two matrices of order m*n and n*p is    
(A)  mnp (B)  mp 
(C)  mn         (D)  np 
   
  Ans:A 
 
Q.14 Merging 4 sorted files containing 50, 10, 25 and 15 records will take____time 
(A)  O (100) (B) O (200) 
(C)  O (175) (D) O (125) 
   
  Ans:A 
 
Q.15  For an undirected graph with n vertices and e edges, the sum of the degree of each vertex is 
equal to 
(A) 2n (B)  (2n-1)/2 
(C) 2e (D)  e
2
/2 
   
  Ans:C 
 
Q.16 In worst case Quick Sort has order  
(A) O (n log n) (B)  O (n
2
/2) 
(C) O (log n) (D)  O (n
2
/4) 
  
   Ans:B 
 
Q.17 A full binary tree with 2n+1 nodes contain 
(A) n leaf nodes (B)  n non-leaf nodes 
(C) n-1 leaf nodes (D)  n-1 non-leaf nodes 
   
  Ans:B 
 
Q.18 If a node in a BST has two children, then its inorder predecessor has 
(A) no left child (B)  no right child 
(C) two children  (D)  no child  
 
  Ans:B 
 
Q.19  A binary tree in which if all its levels except possibly the last, have the maximum number of 
nodes and all the nodes at the last level appear as far left as possible, is known as    
           (A)  full binary tree.                            (B)  AVL tree. 
                 (C)  threaded tree. (D)  complete binary tree. 
  
  Ans:A 
 
 Q.20  A linear list of elements in which deletion can be done from one end (front) and insertion 
can take place only at the other end (rear) is known as a   
(A)  queue. (B)  stack. 
DC08                                                                                                                   DATA STRUCTURES 
 
 
4
(C)  tree. (D)  linked list. 
       
   Ans:A 
  
Q.21 What is the postfix form of the following prefix expression -A/B*C$DE      
(A) ABCDE$*/- (B)  A-BCDE$*/- 
(C) ABC$ED*/-  (D)  A-BCDE$*/ 
       
  Ans:A 
 
Q.22 A full binary tree with n leaves contains    
(A)  n nodes. (B)  n log
2
 nodes. 
(C)  2n –1 nodes. (D)  
n
2 nodes.  
         
  Ans:C 
 
 Q.23  A sort which relatively passes through a list to exchange the first element with any element 
less than it and then repeats with a new first element is called     
(A)  insertion sort. (B)  selection sort. 
(C)  heap sort.        (D)  quick sort. 
 
  Ans:D 
 
  Q.24 Which of the following sorting algorithms does not have a worst case running time of ( )
2
n O ? 
(A)  Insertion sort (B) Merge sort 
(C)  Quick sort (D)  Bubble sort 
 
  Ans:B 
 
Q.25  An undirected graph G with n vertices and e edges is represented by adjacency list.  What is 
the time required to generate all the connected components?  
(A) O (n) (B)  O (e) 
(C) O (e+n) (D)  O ( )
2
e 
 
  Ans:C 
 
Q.26  Consider a linked list of n elements.  What is the time taken to insert an element after an 
element pointed by some pointer? 
(A) O (1) (B)  O ( ) n log
2
 
(C) O (n) (D)  O ( ) n log n
2
 
 
  Ans:A 
 
Q.27 The smallest element of an array’s index is called its 
(A) lower bound. (B)  upper bound. 
(C) range. (D)  extraction. 
Page 5


DC08                                                                                                                   DATA STRUCTURES 
 
 
1
 
TYPICAL QUESTIONS & ANSWERS 
 
PART I 
OBJECTIVE TYPE QUESTIONS 
 
Each Question carries 2 marks. 
 
Q.1  If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the 
expected number of collisions involving a particular key x is :   
    (A)  less than 1. (B)  less than n. 
   (C)  less than m. (D)  less than n/2. 
   
            Ans:A 
Q.2  Let A be an adjacency matrix of a graph G.  The 
th
ij entry in the matrix 
K
A , gives 
    (A)  The number of paths of length K from vertex Vi to vertex Vj. 
   (B)  Shortest path of K edges from vertex Vi to vertex Vj. 
(C) Length of a Eulerian path from vertex Vi to vertex Vj.  
(D) Length of a Hamiltonian cycle from vertex Vi to vertex Vj. 
 
  Ans:B 
 
Q.3  The OS of a computer may periodically collect all the free memory space to form contiguous 
block of free space.  This is called  
   (A)  Concatenation  (B)  Garbage collection 
        (C)  Collision  (D)  Dynamic Memory Allocation 
 
  Ans:B 
 
Q.4  What is the following code segment doing? 
                           void fn( ){ 
                                           char c; 
                           cin.get(c);    
                                            if (c != ‘\n’) {  
                                         fn( ); 
                                         cout.put(c); 
                                                          } 
                                              }      
(A) The string entered is printed as it is.  
(B) The string entered is printed in reverse order. 
(C) It will go in an infinite loop.  
(D) It will print an empty line. 
 
  Ans:B 
 
 
 
DC08                                                                                                                   DATA STRUCTURES 
 
 
2
Q.5 You have to sort a list L consisting of a sorted list followed by a few “random” elements.  
Which of the following sorting methods would be especially suitable for such a task?  
(A) Bubble sort (B)  Selection sort 
(C)  Quick sort (D)  Insertion sort  
  
  Ans:D 
 
Q.6  B Trees are generally 
(A) very deep and narrow (B)  very wide and shallow 
   (C)  very deep and very wide (D)  cannot say 
  
  Ans:D 
 
Q.7  A technique for direct search is   
   (A)  Binary Search (B)  Linear Search 
   (C)  Tree Search (D) Hashing 
   
  Ans:D   
   
Q.8  If a node having two children is deleted from a binary tree, it is replaced by its 
   (A)  Inorder predecessor (B)  Inorder successor 
   (C)  Preorder predecessor (D)  None of the above 
  
Ans:B 
 
Q.9  The searching technique that takes O (1) time to find a data is   
    (A)  Linear Search (B)  Binary Search 
(C)   Hashing  (D)  Tree Search 
  
  Ans:C 
 
Q.10  A mathematical-model with a collection of operations defined on that model is called  
(A) Data Structure (B)  Abstract Data Type 
(C)  Primitive Data Type (D)  Algorithm 
       
  Ans:B 
 
Q.11      The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort  
is                      
 (A) 6                                              (B)  5 
 (C) 7   (D)  8 
       
   Ans:B 
 
Q.12 The postfix form of the expression ( ) ( ) G / F E D C B A * - * * + is    
(A)   * * - * + / FG E CD AB (B)  / G F E CD AB * * - * + 
(C)  / G F E CD AB * * - * + (D)  / G F CDE AB * * - * +  
         
DC08                                                                                                                   DATA STRUCTURES 
 
 
3
  Ans: A 
 
Q.13 The complexity of multiplying two matrices of order m*n and n*p is    
(A)  mnp (B)  mp 
(C)  mn         (D)  np 
   
  Ans:A 
 
Q.14 Merging 4 sorted files containing 50, 10, 25 and 15 records will take____time 
(A)  O (100) (B) O (200) 
(C)  O (175) (D) O (125) 
   
  Ans:A 
 
Q.15  For an undirected graph with n vertices and e edges, the sum of the degree of each vertex is 
equal to 
(A) 2n (B)  (2n-1)/2 
(C) 2e (D)  e
2
/2 
   
  Ans:C 
 
Q.16 In worst case Quick Sort has order  
(A) O (n log n) (B)  O (n
2
/2) 
(C) O (log n) (D)  O (n
2
/4) 
  
   Ans:B 
 
Q.17 A full binary tree with 2n+1 nodes contain 
(A) n leaf nodes (B)  n non-leaf nodes 
(C) n-1 leaf nodes (D)  n-1 non-leaf nodes 
   
  Ans:B 
 
Q.18 If a node in a BST has two children, then its inorder predecessor has 
(A) no left child (B)  no right child 
(C) two children  (D)  no child  
 
  Ans:B 
 
Q.19  A binary tree in which if all its levels except possibly the last, have the maximum number of 
nodes and all the nodes at the last level appear as far left as possible, is known as    
           (A)  full binary tree.                            (B)  AVL tree. 
                 (C)  threaded tree. (D)  complete binary tree. 
  
  Ans:A 
 
 Q.20  A linear list of elements in which deletion can be done from one end (front) and insertion 
can take place only at the other end (rear) is known as a   
(A)  queue. (B)  stack. 
DC08                                                                                                                   DATA STRUCTURES 
 
 
4
(C)  tree. (D)  linked list. 
       
   Ans:A 
  
Q.21 What is the postfix form of the following prefix expression -A/B*C$DE      
(A) ABCDE$*/- (B)  A-BCDE$*/- 
(C) ABC$ED*/-  (D)  A-BCDE$*/ 
       
  Ans:A 
 
Q.22 A full binary tree with n leaves contains    
(A)  n nodes. (B)  n log
2
 nodes. 
(C)  2n –1 nodes. (D)  
n
2 nodes.  
         
  Ans:C 
 
 Q.23  A sort which relatively passes through a list to exchange the first element with any element 
less than it and then repeats with a new first element is called     
(A)  insertion sort. (B)  selection sort. 
(C)  heap sort.        (D)  quick sort. 
 
  Ans:D 
 
  Q.24 Which of the following sorting algorithms does not have a worst case running time of ( )
2
n O ? 
(A)  Insertion sort (B) Merge sort 
(C)  Quick sort (D)  Bubble sort 
 
  Ans:B 
 
Q.25  An undirected graph G with n vertices and e edges is represented by adjacency list.  What is 
the time required to generate all the connected components?  
(A) O (n) (B)  O (e) 
(C) O (e+n) (D)  O ( )
2
e 
 
  Ans:C 
 
Q.26  Consider a linked list of n elements.  What is the time taken to insert an element after an 
element pointed by some pointer? 
(A) O (1) (B)  O ( ) n log
2
 
(C) O (n) (D)  O ( ) n log n
2
 
 
  Ans:A 
 
Q.27 The smallest element of an array’s index is called its 
(A) lower bound. (B)  upper bound. 
(C) range. (D)  extraction. 
DC08                                                                                                                   DATA STRUCTURES 
 
 
5
   
  Ans:A 
 
Q.28 In a circular linked list 
(A) components are all linked together in some sequential manner.  
(B) there is no beginning and no end.  
(C) components are arranged hierarchically.  
(D) forward and backward traversal within the list is permitted. 
 
Ans:B 
 
Q.29  A graph with n vertices will definitely have a parallel edge or self loop of the total number of 
edges are    
    (A)  more than n (B)  more than n+1 
(C)  more than (n+1)/2 (D)  more than n(n-1)/2 
   
  Ans: D 
  
Q.30  The minimum number of multiplications and additions required to evaluate the polynomial  
              P = 4x
3
+3x
2
-15x+45 is 
(A)  6 & 3 (B)  4 & 2 
(C)  3 & 3 (D)  8 & 3 
       
  Ans: C 
 
Q.31 The maximum degree of any vertex in a simple graph with n vertices is 
       (A) n–1                    (B) n+1 
       (C) 2n–1              (D) n 
 
              Ans: A 
 
Q.32 The data structure required for Breadth First Traversal on a graph is    
(A)  queue (B)  stack 
(C)  array (D)  tree  
    
  Ans: A 
 
Q.33 The quick sort algorithm exploit _________ design technique 
      (A) Greedy    (B) Dynamic programming 
                  (C) Divide and Conquer  (D) Backtracking 
 
              Ans: C  
 
Q.34 The number of different directed trees with 3 nodes are 
(A)  2 (B) 3 
(C)  4 (D) 5 
 
  Ans: B 
 
Read More

FAQs on Data Structures - MCQ with answers - Computer Science Engineering (CSE)

1. What are data structures?
Ans. Data structures are a way of organizing and storing data in a computer so that it can be used efficiently. It defines a way of organizing and storing data in a particular way so that accessing and manipulating data becomes easy and efficient.
2. Why are data structures important?
Ans. Data structures are important because they provide a way to store and organize data in an efficient way. With the help of data structures, we can perform operations on data like searching, sorting, inserting, and deleting efficiently. Efficient data structures can help in improving the performance of algorithms and programs.
3. What are the different types of data structures?
Ans. There are several types of data structures, including arrays, linked lists, stacks, queues, trees, graphs, and hash tables. Each data structure has its own advantages and disadvantages, and it is important to choose the right data structure depending on the requirements of the problem.
4. What is the time complexity of different data structures?
Ans. The time complexity of different data structures varies depending on the operation being performed. For example, the time complexity of an array for accessing an element is O(1), while for searching an element, it is O(n). Similarly, the time complexity of a linked list for accessing an element is O(n), while for searching an element, it is O(n). It is important to choose the right data structure depending on the time complexity of the required operation.
5. What is the difference between a stack and a queue?
Ans. A stack is a data structure that follows the Last-In-First-Out (LIFO) principle, where the last element inserted is the first one to be removed. On the other hand, a queue is a data structure that follows the First-In-First-Out (FIFO) principle, where the first element inserted is the first one to be removed. In a stack, we perform two main operations, push and pop, while in a queue, we perform three main operations, enqueue, dequeue, and peek.
Download as PDF

Top Courses for Computer Science Engineering (CSE)

Related Searches

Previous Year Questions with Solutions

,

Extra Questions

,

video lectures

,

Data Structures - MCQ with answers - Computer Science Engineering (CSE)

,

Exam

,

practice quizzes

,

Important questions

,

Objective type Questions

,

Data Structures - MCQ with answers - Computer Science Engineering (CSE)

,

study material

,

Semester Notes

,

shortcuts and tricks

,

pdf

,

ppt

,

mock tests for examination

,

Viva Questions

,

Data Structures - MCQ with answers - Computer Science Engineering (CSE)

,

MCQs

,

Sample Paper

,

Summary

,

Free

,

past year papers

;