490 views
0 votes
0 votes
An array A of size n is known to be sorted except for the first k elements and the last k elements, where K is a constant. Which of the following algorithms will be the best choice for sorting the array A?

A.) quick sort

B.) insertion sort

C.) selection sort

D.) bubble sort

I can’t understand how can insertion sort be better in this case?

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
Emankashyap asked 2 days ago
27 views
In quick sort, n numbers the (n/10)th element is selected as pivot using n^2 sortimng time complexity what will be the time complexity of quick sort is.....a)O(nlogn)b)O(...