Consider an array of elements arr[5]= {5,4,3,2,1} , what are the steps of insertions done while doing insertion sort in the array.
4 5 3 2 1
3 4 5 2 1
2 3 4 5 1
1 2 3 4 5
5 4 3 1 2
5 4 1 2 3
5 1 2 3 4
1 2 3 4 5
4 3 2 1 5
3 2 1 5 4
2 1 5 4 3
1 5 4 3 2
4 5 3 2 1
2 3 4 5 1
3 4 5 2 1
1 2 3 4 5
This question is part of this quiz :
Top MCQs on Sorting Algorithms with Answers,Top MCQs on InsertionSort Algorithm with Answers