Algorithm
Q171.
Of the following sorting algorithms, which has a running time that is least dependent on the initial ordering of the input?Q172.
Given two sorted list of size m and n respectively. The number of comparisons needed the worst case by the merge sort algorithm will be:Q173.
The number of swappings needed to sort the numbers 8 , 22, 7, 9, 31, 5, 13 in ascending order using bubble sort isQ174.
Which one of the following in-place sorting algorithms needs the minimum number of swaps?Q175.
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 are TRUE? I. Quicksort runs in \Theta (n^{2}) time II. Bubblesort runs in \Theta (n^{2}) time III. Merge sort runs in \Theta (n) time IV. Insertion sort runs in \Theta (n) timeQ177.
A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximatelyQ178.
The worst case running times of Insertion sort, Mergesort and Quicksort, respectively, are:Q179.
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?Q180.
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, 17then the order of these elements after second pass of the algorithm is: