Algorithm


Q201.

In quick sort, for sorting n elements, the (n/4)th smallest element is selected as pivot using an O(n) time algorithm. What is the worst case time complexity of the quick sort?
GateOverflow

Q202.

Which one the following in place sorting algorithms needs the minimum number of swaps?
GateOverflow

Q203.

Selection sort algorithm design technique is an example of
GateOverflow

Q204.

The average case and worst case complexities for Merge sort algorithm are
GateOverflow

Q205.

The usual \Theta (n^{2}) implementation of Insertion Sort to sort ab array uses linear search to identify the position where an element is to be inserted into the already sorted part of the array. If, instead, we use binary search to identify the position, the worst case running time will
GateOverflow

Q206.

A sorting technique is called stable if
GateOverflow

Q207.

Quick-sort is run on two inputs shown below to sort in ascending order taking first element as pivot (i). 1, 2, 3, \dots n (ii). n, n-1, n-2, \dots, 2, 1 Let C_1 and C_2 be the number of comparisons made for the inputs (i) and (ii) respectively. Then,
GateOverflow

Q208.

Which one of the following is the tightest upper bound that represents the number of swaps required to sort n numbers using selection sort?
GateOverflow

Q209.

Which one of the following in place sorting algorithms needs the minimum number of swaps?
GateOverflow

Q210.

The number of elements that can be sorted in \Theta (log n) time using heap sort is
GateOverflow