retagged by
428 views

1 Answer

0 votes
0 votes

If array is nearly sorted then insertion sort will perform better, but in case of bubble sort every two adjacent elements are compared.
I think, both S1 and S2 are correct!

Related questions

0 votes
0 votes
1 answer
2
1 votes
1 votes
1 answer
3
1 votes
1 votes
5 answers
4
hitesh159 asked Apr 16, 2019
2,096 views
why not merge sort?we don’t swap in merge sort,we just create auxillary arrays and merge them by changing elements in the original array.should we consider that as a sw...