1.  The following formula is of : 
a.  Bianry Tree 
b.  Complete Binary Tree 
c.  Binary Search Tree 
d.  All of the above 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).Binary Search Tree

2.  Binary search tree has best case runtime complexity of Ο(log n). What could the worst case? 
a.  Ο(n) 
b.  Ο(n2) 
c.  Ο(n3) 
d.  None of the above 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (a).Ο(n)

3.  In order traversal of binary search tree will produce − 
a.  unsorted list 
b.  reverse of input 
c.  sorted list 
d.  none of the above 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).sorted list

4.  In binary heap, whenever the root is removed then the rightmost element of last level is replaced by the root. Why? 
a.  It is the easiest possible way. 
b.  To make sure that it is still complete binary tree. 
c.  Because left and right subtree might be missing. 
d.  None of the above. 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (b).To make sure that it is still complete binary tree.

5.  If we choose Prim's Algorithm for uniquely weighted spanning tree instead of Kruskal's Algorithm, then 
a.  we'll get a different spanning tree. 
b.  we'll get the same spanning tree. 
c.  spanning will have less edges. 
d.  spanning will not cover all vertices. 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (b).we'll get the same spanning tree.

6.  The number of binary trees with 3 nodes which when traversed in post order gives the sequence A,B,C is ? 
a.  3 
b.  4 
c.  5 
d.  6 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).5

7.  Which method can find if two vertices x & y have path between them? 
a.  Depth First Search 
b.  Breadth First Search 
c.  Both A & B 
d.  None A or B 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).Both A & B

8.  Access time of a binary search tree may go worse in terms of time complexity upto 
a.  Ο(n2) 
b.  Ο(n log n) 
c.  Ο(n) 
d.  Ο(1) 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).Ο(n)

9.  Visiting root node after visiting left and right subtrees is called 
a.  Inorder Traversal 
b.  Preorder Traversal 
c.  Postorder Traveral 
d.  None of the above 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).Postorder Traveral

10.  In the deletion operation of max heap, the root is replaced by 
a.  next available value in the left subtree. 
b.  next available value in the right subtree. 
c.  any random value from the heap. 
d.  last element of the last level 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (d).last element of the last level

Questions from Previous year papers
Previous year questions and practice sets
Attempt a small test to analyze your preparation level. This GATE exam includes questions from previous year GATE papers.
Practice test for UGC NET Computer Science Paper. The questions asked in this NET practice paper are from various previous year papers.
copyright 2016 Compscibits.com