this algorithm is so raggedy ass.
you find out which is the smallest, you put it first.
you find out which is second smallest, you put it second, then, you need to shift (to the left) the elements that are between index 2 to index X-1 inclusive (where X is the original index of the second smallest value). After that, you check for the smallest value between index X+1 and the end of the array, and then put it at index X+1, shifting the elements that have index between X+1 and Y-1 to the left (where Y is the index of the smallest value between X+1 and the end).
and so on.