Question 31
Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following is TRUE?
I. Quicksort runs in Θ(n2) time
II. Bubblesort runs in Θ(n2) time
III. Mergesort runs in Θ(n) time
IV. Insertion sort runs in Θ(n) time
Question 33
If one uses a 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 the second pass of the algorithm is:
Question 34
Consider an array of elements arr[5]= {5,4,3,2,1} , what are the steps of insertions done while doing insertion sort in the array.
Question 35
Question 36
*Online - can sort a list at runtime *Stable - doesn\'t change the relative order of elements with equal keys.
Question 37
Question 39
Question 40
There are 61 questions to complete.