Consider array A has 5 elements A[ ]={ 30, 28, 12 , 24, 8}. How many inversions are there in the array after the 2 passes using the selection sort algorithm?
Hint:
Inversion: Let array A[1...n] be an array of elements, If the two indexes i, j of the array. If i
1
4
2
3
3
2
4
1