+1 vote
in Class 12 by kratos

What will be the status of the following after the First, Second and Third pass of the insertion sort method used for arranging the following elements in descending order ?

Note: Show the status of all the elements after each pass very clearly underlining the changes.

1 Answer

+3 votes
by kratos
 
Best answer

| | 22 | 24 | -64 | 34 | 80 | 43 |
| Pass 1 | 24 | 22 | -64 | 34 | 80 | 43 |
| Pass 2 | 24 | 22 | -64 | 34 | 80 | 43 |
| Pass 3 | 34 | 24 | 22 | -64 | 80 | 43 |

...