Question 1
Which of the following sorting algorithms has the lowest worst-case complexity?
Merge Sort
Bubble Sort
Quick Sort
Selection Sort
Question 2
Question 3
Which sorting algorithm will take least time when all elements of input array are identical? Consider typical implementations of sorting algorithms.
Insertion Sort
Heap Sort
Merge Sort
Selection Sort
Question 4
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 are minimized in general?
Heap Sort
Selection Sort
Insertion Sort
Merge Sort
Question 5
Which one of the following in-place sorting algorithms needs the minimum number of swaps?
Insertion Sort
Quick Sort
Heap Sort
Selection Sort
Question 6
How many comparisons are needed to sort an array of length 5 if a straight selection sort is used and array is already in the opposite order?
1
5
10
20
There are 6 questions to complete.