ID  Qus  A  B  C  D  Ans 
1  How many elements do we eliminate in each time for the Analysis of Selection algorithm?  n / 2 elements  (n / 2) + n elements  n / 4 elements  n elements  D 
2  The analysis of Selection algorithm shows the total running time is indeed ________in n  arithmetic  geometric  linear  orthogonal  C 
3  The reason for introducing Sieve Technique algorithm is that it illustrates a very important special case of  divideandconquer  decrease and conquer  greedy nature  2dimension Maxima  A 
4  The sieve technique works in ___________ as follows  phases  numbers  integers  routines  A 
5  For the heap sort, access to nodes involves simple ________ operations  arithmetic  binary  algebraic  logarithmic  A 
6  We do sorting to _________  keep elements in random positions  keep the algorithm run in linear order  keep the algorithm run in (log n) order  keep elements in increasing or decreasing order  D 
7  For the heap sort we store the tree nodes in  levelorder traversal  inorder traversal  preorder traversal  postorder traversal  A 
8  In the analysis of Selection algorithm, we make a number of passes, in fact it could be as many as  T(n)  T(n / 2)  log n  n / 2 + n / 4  C 
9  In which order we can sort?  increasing order only  decreasing order only  increasing order or decreasing order  both at the same time  C 
10  One of the clever aspects of heaps is that they can be stored in arrays without using any _________  pointers  constants  variables  functions  A 
11  Slow sorting algorithms run in  O(n^2)  O(n)  O( log n)  O(n log n)  A 
12   What is the total time to heapify?  O(log n)  O(n log n)  O(n^2 log n)  O(log^2n)  A 
13  After partitioning array in Quick sort, pivot is placed in a position such that  Values smaller than pivot are on left and larger than pivot are on right  Values larger than pivot are on left and smaller than pivot are on right  Pivot is the first element of array  Pivot is the last element of array  A 
14  The running time of quick sort depends heavily on the selection of  No of inputs  Arrangement of elements in array  Size o elements  Pivot element  D 
15  In Quick Sort Constants hidden in T(n log n) are  Large  Medium  Small  Not Known  C 
16  It is possible to sort without making comparisons  True  False  NA  AN  A 
17  Merge sort is stable sort, but not an inplace algorithm  True  False  NA  NA  A 
18  In counting sort, once we know the ranks, we simply _________ numbers to their final positions in an output array  Delete  Copy  Mark  arrange  B 
19  An in place sorting algorithm is one that uses ___ arrays for storage  Two dimensional arrays  More than one array  No Additional Array  None of the above  C 
20  Continuation/counting sort is suitable to sort the elements in range 1 to k  K is Large  K is not known  K may be small or large  K is small  D 
21  In stable sorting algorithm  If duplicate elements remain in the same relative position after sorting  One array is used  More than one arrays are required  Duplicating elements not handled  A 
22  One example of in place but not stable algorithm is  Merger Sort  Quick Sort  Continuation Sort  Bubble Sort  B 
23  Quick sort is _________  Stable & in place  Not stable but in place  Stable but not in place  Some time stable & some times in place  C 
24  Which may be a stable sort?  Merger  Insertion  Both above  None of the above  C 
25  Quick sort is based on divide and conquer paradigm; we divide the problem on base of pivot element and  There is explicit combine process as well to conquer the solutin  No work is needed to combine the subarrays, the array is already sorted  Merging the subarrays  None of above  A 
26  It requires more complicated data structures, Prim's algorithm for a minimum spanning tree is better than Kruskal's when the graph has a large number of vertices  True  False  NA  NA  A 
27  Which of the following sorting algorithms is stable? (i) Merge sort (ii) Quick sort (iii) Heap sort (iv) Counting Sort  Only I  Only ii  Both i and ii  Both iii and iv  A 
28  Mergesort is a stable algorithm but not an inplace algorithm  True  False  NA  NA  A 
29  Memorization is?  To store previous results for future use  To avoid this unnecessary repetitions by writing down the results of recursive calls and looking them up again if we need them later  To make the process accurate  None of the above  B 
30  Dynamic programming algorithms need to store the results of intermediate subproblems  True  False  NA  NA  A 
