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) Heap Sort
(C) Merge Sort
(D) Selection Sort
Explanation: The insertion sort will take (n) time when input array is already sorted.
Quiz of this Question