Algorithm


Q181.

Consider the following sorting algorithms.I. QuicksortII. HeapsortIII> MergesortWhich of them perform in least time in the worst case?
GateOverflow

Q182.

Let P be a quick sort program to sort numbers in ascending order using the first element as the pivot. Let t1 and t2 be the number of comparisons made by P for the inputs [1 2 3 4 5] and [4 1 5 3 2] respectively. Which one of the following holds?
GateOverflow

Q183.

Merge sort uses:
GateOverflow

Q184.

Which of the following sorting algorithms has the lowest worst-case complexity?
GateOverflow

Q185.

Choose the correct alternatives (more than one may be correct) and write the corresponding letters only: Following algorithm(s) can be used to sort n in the range [1\ldots n^3] in O(n) time
GateOverflow

Q186.

The median of n elements can be found in O(n) time. Which one of the following is correct about the complexity of quick sort, in which median is selected as pivot?
GateOverflow

Q187.

Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n ( \geq2) numbers? In the recurrence equations given in the options below, c is a constant.
GateOverflow

Q188.

Algorithm design technique used in quicksort algorithm is?
GateOverflow

Q189.

The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of
GateOverflow

Q190.

Let P be a quicksort program to sort numbers in ascending order. Let t_{1} and t_{2} be the time taken by the program for the inputs \left[1 \ 2 \ 3 \ 4\right] and \left[5 \ 4 \ 3 \ 2 \ 1\right], respectively. Which of the following holds?
GateOverflow