Which of the following stable sorting algorithm takes the least time when applied to an almost sorted array?
Which of the following stable sorting algorithm takes the least time when applied to an almost sorted array? Correct Answer Merge sort
Insertion sort takes linear time to sort a partially sorted array. Though merge and quick sort takes O(n*logn) complexity to sort, merge sort is stable. Hence, Merge sort takes less time to sort partially sorted array.
মোঃ আরিফুল ইসলাম
Feb 20, 2025