An array A of size n is known to be sorted except for the first k elements and last k elements where k is a constant. which of the following algorithms is best suited for sorting the array?
A) Quicksort
B) Bubble sort
C) Selection Sort
D) Insertion Sort
Given answer is D.
unable to understand how this works and also What would have been the answer if Merge sort is also given?