# Tag Archives: Sorting Quiz

## Algorithms | Sorting | Question 20

Which sorting algorithms is most efficient to sort string consisting of ASCII characters? (A) Quick sort (B) Heap sort (C) Merge sort (D) Counting sort… Read More »

## Algorithms | Sorting | Question 19

Which of the following sorting algorithms has the lowest worst-case complexity? (A) Merge Sort (B) Bubble Sort (C) Quick Sort (D) Selection Sort Answer: (A)… Read More »

## Algorithms | Sorting | Question 18

Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists each of which contains… Read More »

## Algorithms | Sorting | Question 17

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… Read More »

## Algorithms | Sorting | Question 16

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… Read More »

## Algorithms | Sorting | Question 15

Which sorting algorithm will take least time when all elements of input array are identical? Consider typical implementations of sorting algorithms. (A) Insertion Sort (B)… Read More »

## Algorithms | Sorting | Question 14

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… Read More »

## Algorithms | Sorting | Question 13

The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of (A) N (B) N^2… Read More »

## Algorithms | Sorting | Question 12

What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary search? (A) N… Read More »

## Algorithms | Sorting | Question 11

You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate? (A) Heap… Read More »

## Algorithms | Sorting | Question 10

What is the best time complexity of bubble sort? (A) N^2 (B) NlogN (C) N (D) N(logN)^2 Answer: (C) Explanation: The bubble sort is at… Read More »

## Algorithms | Sorting | Question 9

Suppose we are sorting an array of eight integers using heapsort, and we have just finished some heapify (either maxheapify or minheapify) operations. The array… Read More »

## Algorithms | Sorting | Question 23

Suppose we are sorting an array of eight integers using quicksort, and we have just finished the first partitioning with the array looking like this:… Read More »

## Algorithms | Sorting | Question 7

Which of the following is not true about comparison based sorting algorithms? (A) The minimum possible time complexity of a comparison based sorting algorithm is… Read More »

## Algorithms | Sorting | Question 6

Consider a situation where swap operation is very costly. Which of the following sorting algorithms should be preferred so that the number of swap operations… Read More »