Question 1
A list of n string, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
O (n*log(n))
O (n2 log n)
O (n2 + log(n))
O (n2)
Question 2
In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. Which of the following is the tightest upper bound on time complexity of this modified Merge Sort.
N(logN base 3)
N(logN base 2/3)
N(logN base 1/3)
N(logN base 3/2)
Question 3
Which of the following sorting algorithms has the lowest worst-case complexity?
Merge Sort
Bubble Sort
Quick Sort
Selection Sort
Question 4
Question 5
Which sorting algorithm will take least time when all elements of input array are identical? Consider typical implementations of sorting algorithms.
Insertion Sort
Heap Sort
Merge Sort
Selection Sort
Question 6
Which of the following is true about merge sort?
Merge Sort works better than quick sort if data is accessed from slow sequential memory.
Merge Sort is stable sort by nature
Merge sort outperforms heap sort in most of the practical situations.
All of the above.
Question 7
Assume that a mergesort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?
256
512
1024
2048
Question 8
Question 9
Which of the following is not a stable sorting algorithm in its typical implementation.
Insertion Sort
Merge Sort
Quick Sort
Bubble Sort
Question 10
If one uses straight two-way merge sort algorithm to sort the following elements in ascending order: 20, 47, 15, 8, 9, 4, 40, 30, 12, 17 then the order of these elements after second pass of the algorithm is:
8, 9, 15, 20, 47, 4, 12, 17, 30, 40
8, 15, 20, 47, 4, 9, 30, 40, 12, 17
15, 20, 47, 4, 8, 9, 12, 30, 40, 17
4, 8, 9, 15, 20, 47, 12, 17, 30, 40
There are 13 questions to complete.