Question: Merge sort is stable sort, but not an in-place algorithm?
- 1. True
- 2. False
- 3. NA
- 4. NA
Question: It is possible to sort without making comparisons?
- 1. True
- 2. False
- 3. NA
- 4. AN
Question: In Quick Sort Constants hidden in T(n log n) are?
- 1. Large
- 2. Medium
- 3. Small
- 4. Not Known
Question: The running time of quick sort depends heavily on the selection of?
- 1. No of inputs
- 2. Arrangement of elements in array
- 3. Size o elements
- 4. Pivot element
Question: After partitioning array in Quick sort, pivot is placed in a position such that?
- 1. Values smaller than pivot are on left and larger than pivot are on right
- 2. Values larger than pivot are on left and smaller than pivot are on right
- 3. Pivot is the first element of array
- 4. Pivot is the last element of array
Question: – What is the total time to heapify?
- 1. O(log n)
- 2. O(n log n)
- 3. O(n^2 log n)
- 4. O(log^2n)
Question: Slow sorting algorithms run in?
- 1. O(n^2)
- 2. O(n)
- 3. O( log n)
- 4. O(n log n)
Question: One of the clever aspects of heaps is that they can be stored in arrays without using any __.
- 1. pointers
- 2. constants
- 3. variables
- 4. functions
Question: In which order we can sort?
- 1. increasing order only
- 2. decreasing order only
- 3. increasing order or decreasing order
- 4. both at the same time
Question: In the analysis of Selection algorithm, we make a number of passes, in fact it could be as many as?
- 1. T(n)
- 2. T(n / 2)
- 3. log n
- 4. n / 2 + n / 4