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