Give the status of this array after the first and second runs of Selection sort algorithm:
12 3 5 2
0 1. 2. 3
Answers
Answered by
1
Answer:
the structure of the heart
Answered by
1
Answer:
selection sort selects minimum element from array and swaps it starting from 1st position in 1st pass, 2nd position in 2nd pass
1st pass : 2 3 5 12 (min is 2, swapped with index 0)
2nd pass : 2 3 5 12 (min is 3, remains at same place)
Similar questions