Computer
Question: Dynamic programming uses a top-down approach?
- 1. True
- 2. False
- 3. NA
- 4. NA
Question: Dynamic programming algorithms need to store the results of intermediate sub-problems?
- 1. True
- 2. False
- 3. NA
- 4. NA
Question: 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: Mergesort is a stable algorithm but not an in-place algorithm?
- 1. True
- 2. False
- 3. NA
- 4. NA
Question: Which of the following sorting algorithms is stable? (i) Merge sort (ii) Quick sort (iii) Heap sort (iv) Counting Sort?
- 1. Only I
- 2. Only ii
- 3. Both i and ii
- 4. Both iii and iv
Question: 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?
- 1. True
- 2. False
- 3. NA
- 4. NA
Question: Quick sort is based on divide and conquer paradigm; we divide the problem on base of pivot element and?
- 1. There is explicit combine process as well to conquer the solutin
- 2. No work is needed to combine the sub-arrays, the array is already sorted
- 3. Merging the subarrays
- 4. None of above
Question: 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: One example of in place but not stable algorithm is?
- 1. Merger Sort
- 2. Quick Sort
- 3. Continuation Sort
- 4. Bubble Sort
Question: In stable sorting algorithm?
- 1. If duplicate elements remain in the same relative position after sorting
- 2. One array is used
- 3. More than one arrays are required
- 4. Duplicating elements not handled