edited by
1,645 views
0 votes
0 votes
Consider the following scenario during insertion sort when the array looks like the following:

{25,75,95,125,80,5,10}

The number of comparisons that it will further take for the array to be completely sorted are______?
edited by

2 Answers

0 votes
0 votes

It is given that “The number of comparisons that it will further take for the array to be completely sorted are”

Hence it means that some of the array was already sorted (first 4 elements).

Hence I think we need to answer the no of comparison for the last unsorted elements,

Related questions

0 votes
0 votes
0 answers
2
Abhishek Kumar 38 asked Dec 19, 2018
630 views
Which of the following sorting algorithm represented by above code?