CS502 DESIGN AND ANALYSIS OF ALGORITHMS
FALL 2010 QUIZ #2 HELD ON 12 NOV 2010
Question # 1 of 10 Total Marks: 1
Memorization is?
1. To store previous results for future use
2. To avoid this unnecessary repetitions by writing down the results of
recursive calls and looking them up again if we need them later
3. To make the process accurate
4. None of the above
Question # 2 of 10 Total Marks: 1
Which sorting algorithm is faster
1. O (n log n)
2. O n^2
3. O (n+k)
4. O n^3
Question # 3 of 10 Total Marks: 1
Quick sort is
1. Stable & in place
2. Not stable but in place
3. Stable but not in place
4. Some time stable & some times in place
Question # 4 of 10 Total Marks: 1
One example of in place but not stable algorithm is
1. Merger Sort
2. Quick Sort
3. Continuation Sort
4. Bubble Sort
Question # 5 of 10 Total Marks: 1
In Quick Sort Constants hidden in T(n log n) are
1. Large
2. Medium
3. Small
4. Not Known
Question # 6 of 10 Total Marks: 1
Continuation sort is suitable to sort the elements in range 1 to k
1. K is Large
2. K is not known
3. K may be small or large
4. K is small
Question # 7 of 10 Total Marks: 1
In stable sorting algorithm.
1. If duplicate elements remain in the same relative position after sorting
2. One array is used
Imrangee
3. More than one arrays are required
4. Duplicating elements not handled
Question # 8 of 10 Total Marks: 1
Which may be a stable sort?
1. Merger
2. Insertion
3. Both above
4. None of the above
Question # 9 of 10 Total Marks: 1
An in place sorting algorithm is one that uses ___ arrays for storage
1. Two dimensional arrays
2. More than one array
3. No Additional Array
4. None of the above
Question # 10 of 10 Total Marks: 1
Continuing sort has time complexity of ?
1. O(n)
2. O(n+k)
3. O(nlogn)
4. O(k)

Sponsored Links