For the array 6,3,8,5,2, illustrate the intermediate steps of the Selection Sort process after each iteration. Provide the array after the first, second, third, and fourth iterations.
Note that the elements are sorted in increasing order.
[2,3,8,5,6]
2,3,8,5,6
2,3,5,8,6
[2,3,5,6,8]
[2,3,8,5,6]
2,3,6,5,8
2,3,5,8,6
[2,3,5,6,8]
[3,6,8,5,2]
3,5,6,8,2
2,3,5,6,8
[2,3,5,6,8]
None of them
2,3,8,5,6
2,3,5,8,6
2,3,5,8,6
2,3,5,6,8
For the array [6, 3, 8, 5, 2], illustrate the
intermediate steps of the Selection Sort process
after each iteration. Provide the array after the
first, second, third, and fourth iterations.
Note that the elements are sorted in increasing order.
2, 3, 8, 5, 6], [2, 3, 8, 5, 6], [2, 3, 5, 8, 6],[2, 3, 5, 6, 8]
[2, 3, 8, 5, 6], [2, 3, 6, 5, 8], [2, 3, 5, 8, 6], [2, 3, 5, 6, 8]
3, 6, 8, 5, 2], [3, 5, 6, 8, 2], [2, 3, 5, 6, 8], [2, 3, 5, 6, 8]
None of them
[2, 3, 8, 5, 6], [2, 3, 5, 8, 6], [2, 3, 5, 8, 6], [2, 3, 5, 6, 8]