A directory of Objective Type Questions covering all the Computer Science subjects.
1.  What is the worst case time complexity of linear search algorithm? 
a.  Ο(1) 
b.  Ο(n) 
c.  Ο(log n) 
d.  Ο(n2) 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (b).Ο(n)

2.  An algorithm is 
a.  a piece of code to be executed. 
b.  a loosely written code to make final code. 
c.  a step by step procedure to solve problem. 
d.  all of the above. 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).a step by step procedure to solve problem.

3.  In context with timecomplexity, find the odd out − 
a.  Deletion from Linked List. 
b.  Searching in Hash Table 
c.  Adding edge in Adjacency Matrix 
d.  Heapify a Binary Heap 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (d).Heapify a Binary Heap

4.  Interpolation search is an improved variant of binary search. It is necessary for this search algorithm to work that − 
a.  data collection should be in sorted form and equally distributed. 
b.  data collection should be in sorted form and but not equally distributed. 
c.  data collection should be equally distributed but not sorted. 
d.  None of the above. 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (a).data collection should be in sorted form and equally distributed.

5.  If the array is already sorted, which of these algorithms will exhibit the best performance 
a.  Merge Sort 
b.  Insertion Sort 
c.  Quick Sort 
d.  Heap Sort 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (b).Insertion Sort

6.  Which of these algorithmic approach tries to achieve localized optimum solution − 
a.  Greedy approach 
b.  Divide and conquer approach 
c.  Dynamic approach 
d.  All of the above 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (a).Greedy approach

copyright 2016 Compscibits.com